Merge pull request #1 from wts42/easier-setup

Easier setup
This commit is contained in:
wts42 2018-04-04 14:55:43 +02:00 committed by GitHub
commit ea0a9e4346
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 11 deletions

View file

@ -14,12 +14,19 @@ Moved the neat graphics to the form window instead of as a gui overlay. I liked
Did some miscellaneous house-keeping, like moving global config settings into their own file, etc.
Instructions
## Instructions
1. Install [BizHawk](https://github.com/TASVideos/BizHawk) prerequesites & emulator:
1. [BizHawk prerequesites (currently 2.1)](https://github.com/TASVideos/BizHawk-Prereqs/releases)
2. [BizHawk (currently 2.2.2)](https://github.com/TASVideos/BizHawk/releases)
2. Get the rom of [Super Mario World (USA)](https://www.google.de/search?q=Super+Mario+World+(USA).sfc). (Other Super Mario World roms might work too but are not tested)
You will need the bizhawk emulator located here: http://tasvideos.org/BizHawk.html
And you will need the super mario world .rom file. (Easy to find online)
Place the neat-mario folder in your \BizHawk-2.2\Lua\SNES\ folder, like BizHawk-2.2\Lua\SNES\neat-mario.
Open bizhawk, click open rom, find super mario world .rom file. Once loaded, click Tools > Lua Console. In the new window, click script > open script. Select mario-net.lua in your \BizHawk-2.2\Lua\SNES\neat-mario folder. The neat control window will display and you can then click Start to begin training.
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.

View file

@ -1,8 +1,17 @@
local _M = {}
--
-- Change BizhawkDir to your BizHawk directory.
--
--_M.BizhawkDir = "C:/Users/mmill/Downloads/BizHawk-2.2/"
_M.BizhawkDir = "X:/BizHawkLab/BizHawk-2.2.2/"
_M.StateDir = _M.BizhawkDir .. "Lua/SNES/neat-mario/state/"
_M.PoolDir = _M.BizhawkDir .. "Lua/SNES/neat-mario/pool/"
_M.NeatConfig = {
--Filename = "DP1.state",
Filename = "C:/Users/mmill/Downloads/BizHawk-2.2/Lua/SNES/neat-mario/pool/DP1.state",
Filename = _M.PoolDir .. "DP1.state",
Population = 300,
DeltaDisjoint = 2.0,
DeltaWeights = 0.4,

View file

@ -969,7 +969,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("DP1.state.pool",config.PoolDir)
--local filename = forms.gettext(saveLoadFile)
forms.settext(saveLoadFile, filename)
loadFile(filename)
@ -1001,7 +1001,7 @@ function onExit()
forms.destroy(form)
end
writeFile("C:/Users/mmill/Downloads/BizHawk-2.2/Lua/SNES/neat-mario/pool/temp.pool")
writeFile(config.PoolDir.."temp.pool")
event.onexit(onExit)