diff --git a/README.txt b/README.txt index 3259c28..4472474 100644 --- a/README.txt +++ b/README.txt @@ -4,7 +4,6 @@ however, feel free to copy any snippets of code you find useful. TODOs: (that i can remember right now) - normalize `for i=a,b` code style -- count decisions made onscreen instead of partial frame count? - normalize and/or embed sprite type inputs - settle on a network architecture - compute how many input neurons the network needs instead of hardcoding diff --git a/main.lua b/main.lua index 1b29113..c009e4e 100644 --- a/main.lua +++ b/main.lua @@ -22,6 +22,7 @@ local es -- evolution strategy. local trial_frames = 0 local total_frames = 0 local lagless_count = 0 +local decisions_made = 0 local force_start = false local force_start_old = false @@ -528,7 +529,7 @@ local function doit(dummy) end end - draw_framecount(12, 215, total_frames) + draw_framecount(12, 215, decisions_made) screen_scroll_delta = screen_scroll_delta + game.R(0x775) @@ -646,6 +647,8 @@ local function doit(dummy) start = force_start_old, select = false, } + else + decisions_made = decisions_made + 1 end end