Post subject: FCEUX - LuaBot and segments
Joined: 12/28/2011
Posts: 14
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
http://jathys.zophar.net/supermetroid/kejardon/m3.c "Torizo Interacts with Bomb Item" --- "Dances behind Bomb" by crollo ;-)
Post subject: Re: FCEUX - LuaBot and segments
AnS
Emulator Coder, Experienced player (724)
Joined: 2/23/2006
Posts: 682
Try asking qFox, the author of LuaBot.
crollo wrote:
Also; did I misunderstand something or is there a bug in the main loop of the framework?
Yes, looks like a mistake often met when porting a C++ code to Lua. LuaBot wasn't tested by a wide public.
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2174
Location: A little to the left of nowhere (Sweden)
qFox hasn't been online since 2009, AnS.
WST
She/Her
Active player (450)
Joined: 10/6/2011
Posts: 1690
Location: RU · ID · AM
But seems to be still active in his Twitter
S3&A [Amy amy%] improvement (with Evil_3D & kaan55) — currently in SPZ2 my TAS channel · If I ever come into your dream, I’ll be riding an eggship :)