Merge pull request #1 from kylechallis/master

Works out of the box now
This commit is contained in:
Colton 2023-09-15 15:49:59 -05:00 committed by GitHub
commit 1d49c426c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 35 deletions

View file

@ -56,13 +56,12 @@ Did some miscellaneous house-keeping, like moving global config settings into th
CRC | MD5 | SHA1
------------- | ------------- | -------------
B19ED489 | CDD3C8C37322978CA8669B34BC89C804 | 6B47BB75D16514B6A476AA0C73A683A2A4C18765
3. Clone the repository or download the zip file and place the neat-mario folder in your \BizHawk-2.2\Lua\SNES\ folder. (like: BizHawk-2.2\Lua\SNES\neat-mario)
4. Open config.lua and change variable _M.BizhawkDir to point on your BizHawk directory.
5. Open BizHawk (EmuHawk.exe)
6. Click File > Open ROM (Ctrl + O) and find Super Mario World (USA).sfc file.
7. Once loaded, click Tools > Lua Console
8. In the new window, click Script > Open Script (Ctrl + O) and select mario-neat.lua in your \BizHawk-2.2\Lua\SNES\neat-mario folder.
9. The NEAT control window will display and you can then click Start to begin training.
3. Clone the repository or download the zip file and place the neat-mario folder in your BizHawk-2.2.2\Lua\SNES\ folder. (like: BizHawk-2.2.2\Lua\SNES\neat-mario)
4. Open BizHawk (EmuHawk.exe)
5. Click File > Open ROM (Ctrl + O) and find Super Mario World (USA).sfc file.
6. Once loaded, click Tools > Lua Console
7. In the new window, click Script > Open Script (Ctrl + O) and select mario-neat.lua in your BizHawk-2.2.2\Lua\SNES\neat-mario folder.
8. The NEAT control window will display and you can then click Start to begin training.
[1]:https://github.com/wts42/Neat-Genetic-Mario/wiki/MarI-O
[2]:https://github.com/mam91/Neat-Genetic-Mario

View file

@ -1,8 +1,8 @@
local _M = {}
_M.NeatConfig = {
--Filename = "DP1.state",
Filename = "C:/Users/mmill/Downloads/BizHawk-2.2/Lua/SNES/neat-mario/pool/DP1.state",
--Filename = "DonutPlains1.state",
Filename = "C:/Users/mmill/Downloads/BizHawk-2.2.2/Lua/SNES/neat-mario/pool/DonutPlains1.state",
Population = 300,
DeltaDisjoint = 2.0,
DeltaWeights = 0.4,

View file

@ -964,7 +964,7 @@ function flipState()
end
function loadPool()
filename = forms.openfile("DP1.state.pool","C:\Users\mmill\Downloads\BizHawk-2.2\Lua\SNES\neat-mario\pool")
filename = forms.openfile("DonutPlains1.state.pool","C:\Users\mmill\Downloads\BizHawk-2.2.2\Lua\SNES\neat-mario\pool")
--local filename = forms.gettext(saveLoadFile)
forms.settext(saveLoadFile, filename)
loadFile(filename)
@ -996,7 +996,7 @@ function onExit()
forms.destroy(form)
end
writeFile("C:/Users/mmill/Downloads/BizHawk-2.2/Lua/SNES/neat-mario/pool/temp.pool")
writeFile("C:/Users/mmill/Downloads/BizHawk-2.2.2/Lua/SNES/neat-mario/pool/temp.pool")
event.onexit(onExit)

View file

@ -7,15 +7,15 @@ _M.TestName = "test1"
--[[
If LoopStates in NeatConfig is enabled it will loop through the states in order changing states with each generation.
States currents have to be manually added to the list below as well as put in the state folder.
States currently have to be manually added to the list below as well as put in the state folder.
--]]
_M.State = {
"DonutPlains1.state",
"DonutPlains4.state",
"IggyCastle.state",
"YoshiIsland1.state",
"YoshiIsland2.state"
"DonutPlains1.state",
-- "DonutPlains4.state",
-- "IggyCastle.state",
-- "YoshiIsland1.state",
-- "YoshiIsland2.state"
}
--[[
@ -29,23 +29,23 @@ _M.State = {
_M.StartPowerup = 0
_M.NeatConfig = {
LoopStates = false,
Population = 300,
DeltaDisjoint = 2.0,
DeltaWeights = 0.4,
DeltaThreshold = 1.0,
StaleSpecies = 15,
MutateConnectionsChance = 0.25,
PerturbChance = 0.90,
CrossoverChance = 0.75,
LinkMutationChance = 2.0,
NodeMutationChance = 0.50,
BiasMutationChance = 0.40,
StepSize = 0.1,
DisableMutationChance = 0.4,
EnableMutationChance = 0.2,
TimeoutConstant = 20,
MaxNodes = 1000000,
LoopStates = false,
Population = 300,
DeltaDisjoint = 2.0,
DeltaWeights = 0.4,
DeltaThreshold = 1.0,
StaleSpecies = 15,
MutateConnectionsChance = 0.25,
PerturbChance = 0.90,
CrossoverChance = 0.75,
LinkMutationChance = 2.0,
NodeMutationChance = 0.50,
BiasMutationChance = 0.40,
StepSize = 0.1,
DisableMutationChance = 0.4,
EnableMutationChance = 0.2,
TimeoutConstant = 20,
MaxNodes = 1000000,
}
_M.ButtonNames = {

View file

@ -969,7 +969,7 @@ function flipState()
end
function loadPool()
filename = forms.openfile("DP1.state.pool",config.PoolDir)
filename = forms.openfile("DonutPlains1.state.pool",config.PoolDir)
--local filename = forms.gettext(saveLoadFile)
forms.settext(saveLoadFile, filename)
loadFile(filename)

0
neat-mario/pool/.gitkeep Normal file
View file