BerryBots forums

It is currently Tue May 21, 2019 3:27 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Bare result reporting
PostPosted: Thu Apr 28, 2016 4:55 pm 
Offline

Joined: Fri Nov 13, 2015 12:38 am
Posts: 18
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+


Top
 Profile  
 
PostPosted: Thu Apr 28, 2016 8:39 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 17, 2012 5:03 am
Posts: 88
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): http://berrybots.com/wiki/MazerEvolver

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.


Top
 Profile  
 
PostPosted: Fri Apr 29, 2016 4:28 pm 
Offline

Joined: Fri Nov 13, 2015 12:38 am
Posts: 18
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group