It is currently Sun Jul 22, 2018 6:45 am Advanced search

Game Rule Question - three way battle?

Random stuff about the contest, posts that don't fit in the other forums.

Game Rule Question - three way battle?

Postby EdwardTonai » Fri Sep 03, 2010 2:45 am

What happens if your AI and the opposing AI arrive at a neutral planet at the same time?
EdwardTonai
Lieutenant
 
Posts: 10
Joined: Wed Feb 17, 2010 8:04 pm

Re: Game Rule Question - three way battle?

Postby antimatroid » Fri Sep 03, 2010 11:12 am

Hello EdwardTonai, nice to see a familiar username ;)

I have a few queries after a bit of playing around (no actual programming to speak of yet), so I'll throw them in here, in no particular order (sorry if some of these would be more obvious if I looked at the code better, I've had a glance).

- What is the travel time of a fleet defined as? Is the number of turns just that ceiling integer distance calculation? (Edit: That statement is correct, from looking at the starter package better, there's even a comment explicitly stating as such).

- Are one second turns going to be too long? I imagine a game with a clear winner may still take quite a few (a lot) of rounds to complete (I've been playing one of the online flash games), if the better bots (or troll bots) end up using a significant amount of their calculation time on each turn, each game could take quite a while to actually run. I see three options, make provisions for the final tournament to actually run for a few weeks (I wouldn't necessarily be opposed to that), have a really short number of turns before a draw (I think this is very undesirable) or shorten the time bots have to make each turn.

I think the first option is best because I see so many different ways one could do a strategy for this, none of which are obviously the best way like was the case with tron, so it would be nice if people could still try bots that take the full second to make their calculation (plus this is important for the people using less efficient languages), but if you must have the fast result turn around, I would suggest possibly shortening the calculation time rather than the number of turns before a draw. Also, some clarification is going to be needed at some point on the number of turns before a draw is declared. Also, is there a given upper limit on the number of planets?

- While on the topic of calculation time, even though I think it's going to be pretty damn hard to screw a timer up on this one, could I suggest that you please consider changing the disqualification rule on exceeding the time limit to make a turn. I would personally set that to simply losing that game, but if you really want to have it lead to disqualification, allow it to happen at least 3 times or so before kicking one out. I really don't expect to get pinged on this again, but I think it's a terrible way for anyone to finish after going through the work to make a bot.

- Could we get a definitive clarification on whether strictly new maps or not will be used in the final tournament, otherwise an approach at training a bot on the particular set of maps might prove like a reasonable idea. Also, are maps being made such that it's symmetric? So as to ensure each player starts with equal probability of winning each game? Could we also get more games among the top 25 bots run in the final tournament to ensure the places best represent the quality of the bots?

If I think of more I will add them.
Last edited by antimatroid on Fri Sep 03, 2010 1:45 pm, edited 1 time in total.
antimatroid
Brigadier-General
 
Posts: 126
Joined: Tue Feb 16, 2010 7:41 am

Re: Game Rule Question - three way battle?

Postby antimatroid » Fri Sep 03, 2010 1:05 pm

Also, upon further thought, I think the case of ships arriving at the same time should be handled fine, if an equal number of ships arrive as it hits zero, then they continue cancelling each other out and it remains neutral, until one player hits it with an additional ship than the other, I think that might be a slight abuse of the current rules, but see no other way of handling it (I'm not sure what it currently does, I'm going to guess as I just described).
antimatroid
Brigadier-General
 
Posts: 126
Joined: Tue Feb 16, 2010 7:41 am

Re: Game Rule Question - three way battle?

Postby a1k0n » Mon Sep 06, 2010 7:11 pm

Unless things have changed since the following game was played, the three-way battle doesn't actually work correctly:

http://ai-contest.com/visualizer.php?game_id=4412883

About 60% of the way through the game, red sends 49 units to the '9' empty planet in the upper left and green sends 72, and they land simultaneously. Result? Red takes it with 44 ships left, as if the 72 green ships weren't there at all.

So I suspect there's an if(red ships land) { ... } else if(green ships land) { ... } and the three-way case needs to be explicitly checked.
a1k0n
Colonel
 
Posts: 90
Joined: Fri Feb 12, 2010 3:51 am

Re: Game Rule Question - three way battle?

Postby bswolf » Mon Sep 06, 2010 9:27 pm

The three-way case currently has a bug in the server's engine code, but normally it should be: the arriving players take turns trading a ship in their fleet(s) with a ship on the planet, then if the defending player is been defeated and multiple players are still attacking, the players take turns losing a ship in their fleet(s) until only one is left, and that one takes the planet with what is left.

The bug is that the last part isn't actually taking turns, so one player loses all his ships and the other one gets the planet.
bswolf
Lieutenant
 
Posts: 15
Joined: Fri Sep 03, 2010 6:14 am

Re: Game Rule Question - three way battle?

Postby antimatroid » Mon Sep 06, 2010 11:09 pm

You want to calculate it as follows (for two owners having fleets arriving at a neutral planet at the same time).

Let F1 = the number of ships arriving for player1 1 and F2 = the number of ships arriving for player 2.

if(F1 + F2 <= P.NoShips())
(decrease ships by F1 + F2)
else if (F1 == F2)
(ships = 0, planet remains neutral)
else
(owner = player maximising (F1, F2) and number of ships is, abs(F1-F2).

I think that handles every case correctly.
Last edited by antimatroid on Tue Sep 07, 2010 3:50 am, edited 1 time in total.
antimatroid
Brigadier-General
 
Posts: 126
Joined: Tue Feb 16, 2010 7:41 am

Re: Game Rule Question - three way battle?

Postby jeff.cameron » Tue Sep 07, 2010 1:09 am

I have just been working with jklandis and jokeserver to resolve the bugs in the battle resolution code. Jokeserver actually checked out the code, fixed it, and sent me a patch! That is exactly what I hoped would start to happen if we open-sourced the backend code.

Anyways, I think his changes should do the trick. Please let us know if you see a replay not behaving as it should.
jeff.cameron
Contest Organizer
 
Posts: 91
Joined: Sun Jan 31, 2010 4:06 am

Re: Game Rule Question - three way battle?

Postby smhanov » Tue Sep 07, 2010 1:52 pm

Do we need to download the starter kit again due to this change?
smhanov
Cadet
 
Posts: 6
Joined: Fri Sep 03, 2010 12:11 pm

Re: Game Rule Question - three way battle?

Postby jmcarthur » Tue Sep 07, 2010 4:04 pm

The 3-way battle issue has been discussed a bit here, as well: viewtopic.php?f=18&t=419
jmcarthur
Colonel
 
Posts: 80
Joined: Fri Feb 05, 2010 3:41 pm


Return to Misc

Who is online

Users browsing this forum: No registered users and 1 guest

cron