[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 - Defensive strategy

It is currently Sat Sep 22, 2018 12:20 am Advanced search

Defensive strategy

Share and discuss ideas for your entries here.

Defensive strategy

Postby Mistmanov » Mon Oct 25, 2010 7:29 pm

Last edited by Mistmanov on Mon Oct 25, 2010 8:33 pm, edited 1 time in total.
Mistmanov
Colonel
 
Posts: 70
Joined: Fri Sep 24, 2010 6:50 pm

Re: Defensive strategy

Postby siconize » Mon Oct 25, 2010 7:44 pm

siconize
Captain
 
Posts: 27
Joined: Wed Oct 20, 2010 9:48 pm

Re: Defensive strategy

Postby mrflippy » Tue Oct 26, 2010 12:12 am

I do something similar, though there are some good ideas here.

One of the problems I have is that my bot only takes my ships and all fleets in flight into account -- it doesn't yet take enemy ships on planets into account, so large fleets of ships from close enemy planets can be an issue.
mrflippy
Lieutenant
 
Posts: 11
Joined: Fri Oct 15, 2010 3:55 pm

Re: Defensive strategy

Postby bhasker » Tue Oct 26, 2010 1:45 pm

My defense strategy is quite simple. It calculates how many ships are needed to keep the planet taking into account all enemy inbound ships. Then it does a calculation which averages out number of ships incoming per turn and adds that many ships to the mix. The reason I do that is because I tend to support planets from far off planets at times and if the enemy has a closer planet and you just send enough to hold the planet, you won't be able to match his rate of flow.

As for launches, the way I do it is a bit like the following.

1) build a list of available ships from each planet and put it on a priority queue
2) pick a planet ( can be neutral/enemy/mine) depending on its value
3) calculate if we should take the neutral /attack the enemy. I always support my planets.
4) launch fleets.
5) resort availability queue by distance from target, so that closest planets are evaluated first as possible launch sites
6) start an order Queue
7) the for each source planet calculate how many ships need to be launched to acquire/hold the target planet taking into account ships already launched in this order
8) if at any point numShipsRequired-shipsSent > totalAvailable cancel the order queue.
9) if we have enough ships launch them
10) launching is synchronized so, i launch from planets that are further away first.
bhasker
Lieutenant
 
Posts: 12
Joined: Tue Sep 14, 2010 2:17 am

Re: Defensive strategy

Postby Demerzel » Tue Oct 26, 2010 5:51 pm

You describe my initial BasicDefense to a T except I call them lowestShipLevel and maxFriendlyTo. Extend maxFriendlyTo to maxEnemyTo and you've got a useful targetting/defense metric too. I didn't see you mention if you deducted growth from lowestShipLevel either - your forecasting horizon is so short I doubt it matters but if in 20 turns my 5 growth planet has 100 ships and right now it has 5, then really it needs to keep all of them since 100-(20-5) = 0 and if I went any lower it'd be <0

I am surprised anybody could defend anything for long without at least calculating these 2, unless your targetter is incredibly picky you'd just be sending off all your ships even if you send defenses

The only real addition to that is a knapsack implementation with planets as to whether or not you want to defend them. But generally speaking unless you're already losing that shouldn't be a consideration.

The major limiting factor with this approach is turns since anything you consider must be launched now, but to really manage planned launches etc is a whole major overhaul, I have no idea how you'd do it while still using the starter package I don't even remember what it looks like any more
Demerzel
Colonel
 
Posts: 72
Joined: Sat Oct 02, 2010 6:06 am
Location: themendios at gee mail

Re: Defensive strategy

Postby Demerzel » Tue Oct 26, 2010 6:03 pm

Even though my current bot is messed up (bug waits for incoming to stop before launching, which sometimes doesn't happen and other times means I've lost momentum) I don't want to try to reload it since it took me 2 weeks to get even that up but even so it has one of my favorite games ever just because it highlights my defenses, every single move he makes I counter: http://ai-contest.com/visualizer.php?game_id=6000464

Makes me feel good bout spending all that time setting up a defensive grid!
Demerzel
Colonel
 
Posts: 72
Joined: Sat Oct 02, 2010 6:06 am
Location: themendios at gee mail

Re: Defensive strategy

Postby dragonitor » Wed Oct 27, 2010 1:45 pm

dragonitor
Lieutenant
 
Posts: 11
Joined: Fri Oct 22, 2010 10:01 am

Re: Defensive strategy

Postby Demerzel » Wed Oct 27, 2010 2:30 pm

Demerzel
Colonel
 
Posts: 72
Joined: Sat Oct 02, 2010 6:06 am
Location: themendios at gee mail

Re: Defensive strategy

Postby dragonitor » Wed Oct 27, 2010 4:13 pm

What I do is I check all the enemies fleets destinationplanets if these are on me, I put them in an arraylist.
Now I calculate the total armies that are going to those planet and put them in an array.
After this I do exactly the same with my fleets

After that I do hisfleets army - myfleets army to my planet for planet that gets attacked, than I use this array to know how much I have to send to my attacked planets.
dragonitor
Lieutenant
 
Posts: 11
Joined: Fri Oct 22, 2010 10:01 am

Re: Defensive strategy

Postby Demerzel » Wed Oct 27, 2010 4:18 pm

Demerzel
Colonel
 
Posts: 72
Joined: Sat Oct 02, 2010 6:06 am
Location: themendios at gee mail

Next

Return to Strategy

Who is online

Users browsing this forum: No registered users and 1 guest

cron