BerryBots forums

Bare result reporting
Page 1 of 1

Author:  Croug [ Thu Apr 28, 2016 4:55 pm ]
Post subject:  Bare result reporting

So I'm thinking about doing some genetic programming with bbots, and in order to do that, I need a version of bbots that runs the match and submits the results via std out in a parsable format, i don't even need it to save the replay, is there any way to do that with the existing structure, or could you point me towards some things I might modify in the source to make it possible? Also I need this done with the webui build because I cannot initialize GTK+

Author:  Voidious [ Thu Apr 28, 2016 8:39 pm ]
Post subject:  Re: Bare result reporting

The cli version of BerryBots you get from linuxcli or osxcli prints the results - I think you could take the code pretty much verbatim from bbsfmlmain.cpp (linuxcli) here and paste it into bbwebmain.cpp (webui). It should be pretty easy to parse that output, or you could tweak it to your liking.

In that setup, you'd have a stand-alone program doing your genetic algorithms stuff, executing BerryBots, and collecting the results. So you could do that in any language you like. As an alternative, you could write your GA code in Lua as a Game Runner script and use that to run BerryBots matches and analyze the results. Game Runners can write stages and bots (to stages/runners/* and bots/runners/*), which I added specifically to enable GA. I wrote a sample runner that uses GA to evolve a bot to solve a modified maze2 (that gives additional metrics to enable the fitness function):

This would be a little cleaner than wrapping BerryBots itself and would give you multi-threading for free, but also requires running it locally through the GUI and writing your genetic algorithms stuff in Lua. It would be nice if you could execute Game Runner scripts from the command line, too - that wouldn't be too hard to implement.

Author:  Croug [ Fri Apr 29, 2016 4:28 pm ]
Post subject:  Re: Bare result reporting

Okay cool thank you, now is there a command line option I can specify that will prevent it from creating and saving a replay, because I feel that would take time and resources away from the algorithm, and I'd like it to go through generations fairly quickly.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group