[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - Our Genetic Program

It is currently Sat Nov 18, 2017 12:03 pm Advanced search

Our Genetic Program

Share and discuss ideas for your entries here.

Our Genetic Program

Postby space.invaders » Sat Nov 20, 2010 5:47 pm

The bot is a Genetic Program. We have been working on it since mid-September. It is a customized implementation in PHP. Around half the code is generic GP stuff such as crossovers of strategies, mutation, dead code elimination, and a genetic engine that allows parallelization. The second half is implementing the game (we have our own game engine) and providing problem parameters that are used by the genetic engine. Problem parameters represent the current game state. We have basic parameters, such as number of planets and ships for each player, distances, growth rates etc. We also have derived parameters, which we think represent useful information, such as “future owner” of a planet, which tells the GP the owner of a planet when all the fleets that are currently on the way will have arrived. Other examples of derived parameters are “number of ships on the destination planet at fleet arrival time” and “minimum number of ships I need at each of my planets to ensure that I will stay the owner”. We call the derived parameters, because in principle the GP could find the significance of these parameters itself, but it saves time to provide this information, as it is pretty obvious that it is important. You may call this “cheating” if you want. Note, however, that we never tell the GP what to do with this information, e.g. not to send fleets away from our planets when the “future owner” is the enemy. If this happens to be a good strategy, then the GP would have to find it out by itself.

Last night we started the “big evolution”. It runs on 5 PCs, we are now at generation 28. We will let it run for the final week, and we will keep submitting the best strategy once or twice a day. The strategy that is currently online is from generation 18. It just after losing the first 5, and we are now ranked 951.

We have no idea where we will end, because we never made an evolution run longer than one night except with very small population sizes. Our goal was to run 1000 generations, but it looks like we will get only 200 or so (after the weekend, the PCs are needed during daytime for something we call “work”). Also, we have a long list of ideas that had to be cancelled because there is no more time (the most interesting one would have been “enemy move prediction”). But I guess that’s the case for all participants here.

We would love to finish in the top 100, but there are so many really good strategies online now that this is going to be very hard.
space.invaders
Lieutenant-Colonel
 
Posts: 41
Joined: Fri Sep 10, 2010 9:19 pm

Re: Our Genetic Program

Postby Torquemada2 » Sat Nov 20, 2010 9:47 pm

Nice done! I thought it was impossible to make the pure genetic program for this contest, only to improve some parametres in evaluating function, but you made it! But why you don't use C++, it is much faster? And do you use only your different bots for testing, or do you use another bots, for example in TCP server?
Torquemada2
Captain
 
Posts: 27
Joined: Tue Oct 26, 2010 9:48 pm

Re: Our Genetic Program

Postby space.invaders » Sat Nov 20, 2010 10:01 pm

The programs would run faster in C++, but a scripting language is very convenient if you generate programs. Generate the source code, make an "eval" and run it. Consider that you don't need a compile/link step for your generated programs, I'm not sure that C++ would be faster overall.

The bots basically only play against each other. We have two hand-made bots that we used for benchmarking, just to have an idea how good the GPs are. We did not use the TCP server.
space.invaders
Lieutenant-Colonel
 
Posts: 41
Joined: Fri Sep 10, 2010 9:19 pm

Re: Our Genetic Program

Postby Torquemada2 » Sat Nov 20, 2010 11:09 pm

It is very intersting, will it be able to play at top level if it had more time and opportunity to play with top bots not only with herself. What rank has your hand-made bot? I can give you exe files of several bots wtih different strengths, from 50 to 300 places in rank for testing, including my previous version, if you need.

P.S. You have 3 wins and 2 loses now and a 565 place. Very good result. Do you now why dont take planet near it's home with defence 8 in that game: http://ai-contest.com/visualizer.php?game_id=8123125 ?
Torquemada2
Captain
 
Posts: 27
Joined: Tue Oct 26, 2010 9:48 pm

Re: Our Genetic Program

Postby space.invaders » Sun Nov 21, 2010 12:23 am

space.invaders
Lieutenant-Colonel
 
Posts: 41
Joined: Fri Sep 10, 2010 9:19 pm

Re: Our Genetic Program

Postby dimkadimon » Mon Nov 22, 2010 2:34 am

dimkadimon
Major-General
 
Posts: 263
Joined: Wed Oct 06, 2010 11:34 pm
Location: Adelaide, Australia

Re: Our Genetic Program

Postby space.invaders » Mon Nov 22, 2010 6:21 am

space.invaders
Lieutenant-Colonel
 
Posts: 41
Joined: Fri Sep 10, 2010 9:19 pm

Re: Our Genetic Program

Postby space.invaders » Mon Nov 22, 2010 7:38 pm

We have now a bot from generation 81 online, it is hovering around rank 250. We are on the way to our top 100 goal, but still, major improvements are needed.

At this stage, the GPs are better than our hand-made strategies. We will now insert a few versions of the hand-made bots into the evolution. They are not good enough to survive for very long, but we hope that before they get extinct, they can pass on some of their better genes (= code snippets), and thus improve the gen pool. It is a bit "playing the Hand of God", as Maradona would say. It may not have any impact, and in any case the impact will not be large (compared to Maradona anyway). We did not want to do this too early, because the risk is that the hand-written code would spread too quickly and too much in a weak population, eliminating most of the other code, so that the whole concept of GP would be disrupted. At this stage, however, that risk is nil.

You may say that this is not pure Genetic Programming anymore and you would be right.
It is just one of the dirty little tricks we do, in order to improve our bot as much as possible. We are terribly sorry about that.
We have two or three more of these tricks up our sleeves, none of them will have a big impact. It's all just playing around with ideas.
space.invaders
Lieutenant-Colonel
 
Posts: 41
Joined: Fri Sep 10, 2010 9:19 pm

Re: Our Genetic Program

Postby ohCrivens » Mon Nov 22, 2010 8:27 pm

Is there any chance you could surrender the code after the contest ends?
I think I could spend a few sleepless nights learning from it.

I have never seen anything like this in action and I have to admit I might become a bit obsessed in seeing the source.
It is plain amazing even if it's not going to rank in top100!

Awesome job.
ohCrivens
Cadet
 
Posts: 1
Joined: Mon Nov 22, 2010 8:21 pm

Re: Our Genetic Program

Postby space.invaders » Mon Nov 22, 2010 11:28 pm

space.invaders
Lieutenant-Colonel
 
Posts: 41
Joined: Fri Sep 10, 2010 9:19 pm

Next

Return to Strategy

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron