[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 - How to spend your first turn

It is currently Sat Apr 21, 2018 7:32 am Advanced search

How to spend your first turn

Share and discuss ideas for your entries here.

How to spend your first turn

Postby mcmillen » Sun Oct 03, 2010 9:50 pm

mcmillen
Cadet
 
Posts: 5
Joined: Sun Oct 03, 2010 12:30 pm

Re: How to spend your first turn

Postby jesionaj » Sun Oct 03, 2010 10:31 pm

Picking the best set of planets is essentially the . Taking a approach to solving it is significantly faster than iterating through every combination.
User avatar
jesionaj
Cadet
 
Posts: 6
Joined: Fri Sep 24, 2010 12:14 am

Re: How to spend your first turn

Postby mcmillen » Sun Oct 03, 2010 10:42 pm

It's true that it's the 0-1 knapsack problem. In fact I have a TODO in my code to fix that, but thought the combinations thing was easier to explain, and I already had the code for it :)
mcmillen
Cadet
 
Posts: 5
Joined: Sun Oct 03, 2010 12:30 pm

Re: How to spend your first turn

Postby RebelXT » Mon Oct 04, 2010 2:42 am

mcmillen, kudos for an excellent strategy post!! first turn is extremely important. I ended up with a more complex function than optimizing for max growth, but the principle of calculating the best set of planets to expand to is similar to yours.
RebelXT
Colonel
 
Posts: 81
Joined: Fri Sep 10, 2010 2:05 pm

Re: How to spend your first turn

Postby Ouroboros » Tue Oct 05, 2010 8:26 pm

I have to say this is simply impressive, mainly due to the clarity of the post. A must read undoubtedly. On the other hand, regarding jesionaj’s comment, for these few elements, I’d rather go for an extensive search such as the one proposed (which is, in my opinion, much easier to program) than dynamic programming
Ouroboros
Cadet
 
Posts: 2
Joined: Thu Sep 30, 2010 7:56 pm

Re: How to spend your first turn

Postby Poita_ » Wed Oct 06, 2010 7:38 am

Poita_
Cadet
 
Posts: 1
Joined: Wed Oct 06, 2010 7:28 am

Re: How to spend your first turn

Postby neurotik » Wed Oct 06, 2010 9:07 am

neurotik
Cadet
 
Posts: 7
Joined: Mon Sep 13, 2010 7:49 pm

Re: How to spend your first turn

Postby neurotik » Wed Oct 06, 2010 4:33 pm

Oh, just noticed that I broke it when cleaning up the code. The array creation has to go after the loop where the weights array is generated....
neurotik
Cadet
 
Posts: 7
Joined: Mon Sep 13, 2010 7:49 pm

Re: How to spend your first turn

Postby yasith » Thu Oct 07, 2010 2:33 pm

yasith
Cadet
 
Posts: 5
Joined: Tue Sep 28, 2010 9:44 am

Re: How to spend your first turn

Postby perm_dummy » Thu Oct 07, 2010 8:15 pm

perm_dummy
Cadet
 
Posts: 3
Joined: Thu Oct 07, 2010 7:49 pm

Next

Return to Strategy

Who is online

Users browsing this forum: No registered users and 1 guest

cron