Hello,
I have been experimenting with the LuaBot for FCEUX and managed to get some interesting results out of it, like randomly jumping through World 1-1 in SMB. I know it is not really meant for this scenario, but I thought it would be a good starting point for learning how the interaction works.
However the question is what the isSegmentEnd/mustRollBack functionality would be used for? Seems it's quite relevant since OK/failed attempts seem to be grouped into "Segments" based on the info in the GUI. You also get this playback of "Best attempt this segment" after the run is finished.
I haven't really understood how to implement it based on the "manual":
http://www.fceux.com/web/help/fceux.html?LuaBot.html
Could someone please give me an example? Perhaps some LuaBot code that uses this feature or just a good description of a real case. There are some other examples I would very much like to see like what code to execute in the onStart etc. Perhaps a good tutorial exists somewhere on the web? I haven't managed to find one though :-(
Also; did I misunderstand something or is there a bug in the main loop of the framework?
Line 387:
while (rand_if(isRunEnd())) do
My fix:
while (rand_if(isRunEnd() == false)) do
BR,
crollo