hquxmu / ai-contest

Automatically exported from code.google.com/p/ai-contest
0 stars 0 forks source link

playgame.jar deletes one fleet from existence when it shouldnt #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Play 2 RageBots against each other using the supplied playgame.jar, on Map 
44 (other maps too no doubt)
2. watch the playback, look at the second last turn.
Both planets have 25 ships and both fleets are 100
next turn, P1's 100 fleet is gone, and his home planet was taken.  it should 
have been both players being identical (70 on each planet, ownership swap)
This is hitting other bots, not just Rage :-)

The bug did not occur in the previous version of the playgame.jar in the 
starter pack (dated 5-sep, new one is 7-sep)

Original issue reported on code.google.com by zap...@gmail.com on 8 Sep 2010 at 1:07

GoogleCodeExporter commented 9 years ago

Original comment by cameron.jp@gmail.com on 9 Sep 2010 at 3:40

GoogleCodeExporter commented 9 years ago
Wow, this is totally my fault.

Game.java:271-275
  if (enemyFleets.size() == 1) {
    p.Owner(enemyFleets.get(0).Owner());
    p.NumShips(enemyFleets.get(0).NumShips());
    break;
  }

This was part of my patch for the off by one bug...the break statement was 
originally inside the correct while loop, but I brought it outside so now it 
breaks the loop over all planets conquered this turn... :(

Jeff, could you remove that line and commit again?

Original comment by jokeserver on 9 Sep 2010 at 7:40

GoogleCodeExporter commented 9 years ago
Issue 73 has been merged into this issue.

Original comment by andy.sloane on 9 Sep 2010 at 8:37

GoogleCodeExporter commented 9 years ago
Issue 64 supersedes this issue.  Whatever patch is accepted for 64 will almost 
certainly rewrite all the battle resolution code in both the Java and Python 
engines.

Original comment by jklan...@gmail.com on 9 Sep 2010 at 6:27

GoogleCodeExporter commented 9 years ago
Fixed in latest starter packs.

Original comment by andy.sloane on 10 Sep 2010 at 6:40