From 85d605a6ffa89d99066c1bff1f94e17917b0b9a2 Mon Sep 17 00:00:00 2001 From: empathicqubit Date: Fri, 5 Mar 2021 18:49:22 -0500 Subject: [PATCH] Added more details to README. Fix the GUI output some more --- README.md | 28 ++++++++++++++++++++++++++-- neat-donk.lua | 6 +++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6c7f01c..10838b0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,26 @@ -# Neat[Tinkering] -MarI/O for DKC2/lsnes. Not usable yet. +# Donkey Kong Country 2 NEAT + +An AI based on SethBling's MarI/O to play Donkey Kong Country 2 with lsnes. + +## Requirements + +* lsnes with **Lua 5.2** (do not try to build with 5.3, it does not work!) +* A Donkey Kong Country 2 ROM + +## Instructions + +1. Start lsnes +2. Go to `Configure -> Settings -> Advanced` and change `LUA -> Maximum memory use` to `1024MB` +3. Load the DKC2 ROM: `File -> Load -> ROM...` +4. Load the script: `Tools -> Run Lua script...` +5. You may also want to turn off sound since it may get annoying. `Configure -> Sounds enabled` + +## Keys +1: Stop/start +4: Play the best run +6: Save the pool file +8: Load the pool file +9: Restart + +## Notes +Only tested on Pirate Panic diff --git a/neat-donk.lua b/neat-donk.lua index 09c5470..f63a8a3 100644 --- a/neat-donk.lua +++ b/neat-donk.lua @@ -1066,8 +1066,8 @@ function displayGenome(genome) for o = 1,Outputs do cell = {} - cell.x = 220 - cell.y = 30 + 14 * o + cell.x = 400 + cell.y = 20 + 14 * o cell.value = network.neurons[config.NeatConfig.MaxNodes + o].value cells[config.NeatConfig.MaxNodes+o] = cell local color @@ -1076,7 +1076,7 @@ function displayGenome(genome) else color = 0x00000000 end - gui.text(223, 24+14*o, config.ButtonNames[o], color, 0xff000000) + gui.text(403, 10+14*o, config.ButtonNames[o], color, 0xff000000) end for n,neuron in pairs(network.neurons) do