[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/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 - Game mechanics question answered!

It is currently Tue Sep 18, 2018 2:24 pm Advanced search

Game mechanics question answered!

Share and discuss ideas for your entries here.

Re: Game mechanics question answered!

Postby temp_dummy » Sat Sep 18, 2010 1:26 pm

ooh!

When did this happen?

I think I see no such thing in:
http://code.google.com/p/ai-contest/sou ... /Game.java

No merging in Method(s):
public String PovRepresentation(int pov)
public void DoTimeStep() (dumps every fleet)
public int IssueOrder()

private void FightBattle(Planet p)
only removes fleets when they are at destination.

So my actual question could be:
Where can we find the code of the engine as it is currently ran on the server?
temp_dummy
Colonel
 
Posts: 87
Joined: Sat Sep 11, 2010 6:00 pm

Re: Game mechanics question answered!

Postby Janzert » Sat Sep 18, 2010 5:37 pm

The server uses the python engine at .

Although the server won't always have the very latest version from svn of course. Of course the java engine should be updated to match as well.

Janzert
Janzert
Contest Organizer
 
Posts: 271
Joined: Sun Feb 07, 2010 1:59 am

Re: Game mechanics question answered!

Postby temp_dummy » Sat Sep 18, 2010 6:07 pm

Ok so I looked at the py-code and I had some questions for the chosen implementation.

(Pure out of professional interest)
The de-dupe method uses nested dictionaries to store the source/dest/shipcount combination.
Is that more efficient than using a single dictionary with a compound key?

In the 1.2 Java engine, the fleets are created in the issue_order method,
In the python code fleet creation is postponed until after all orders have been issued.
Again, is this more efficient?

The reason why I am asking is because I made a C# port of the Java-version and am currently implementing the De-Dupe in the port.
However, the Python version seems to me more complex than needed and Using a single dictionary I can implement it with far less lines of code/work.
So thee design decisions are important to me because if there were none, I will stick to my simple version.
temp_dummy
Colonel
 
Posts: 87
Joined: Sat Sep 11, 2010 6:00 pm

Re: Game mechanics question answered!

Postby jmcarthur » Sat Sep 18, 2010 7:14 pm

Last edited by jmcarthur on Sat Sep 18, 2010 7:22 pm, edited 1 time in total.
jmcarthur
Colonel
 
Posts: 80
Joined: Fri Feb 05, 2010 3:41 pm

Re: Game mechanics question answered!

Postby jmcarthur » Sat Sep 18, 2010 7:21 pm

I'll use this thread to track additional changes to the spec:

A patch has been merged in to correct the turn timeouts. It originally said that the first turn was 3 seconds and all following turns were 1. In reality, even the first turn is only 1 second.

Something else that needs to be changed is that a player with no ships doesn't necessarily lose if he still owns a planet, even with 0 ships on it.
jmcarthur
Colonel
 
Posts: 80
Joined: Fri Feb 05, 2010 3:41 pm

Re: Game mechanics question answered!

Postby Terr » Sun Sep 19, 2010 5:22 am

Terr
Brigadier-General
 
Posts: 155
Joined: Mon Sep 13, 2010 9:19 pm

Re: Game mechanics question answered!

Postby delt0r » Sun Sep 19, 2010 7:10 am

It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

Re: Game mechanics question answered!

Postby Terr » Sun Sep 19, 2010 7:31 am

Terr
Brigadier-General
 
Posts: 155
Joined: Mon Sep 13, 2010 9:19 pm

Re: Game mechanics question answered!

Postby temp_dummy » Sun Sep 19, 2010 8:46 am

I am not very familiar with IEEE Floating-point arithmetic, except that I am running into them with my C# point of the engine.
My engine does not return same values for distances as the Java implementation (which has serious impact in the behaviour.)

Isn't there a way to avoid the biggest rounding errors?

Right now the ( average random ) map design is 25.0 * 25.0 units.
Your ships travel at a speed of 1 unit per turn.
Values are stored as a float.
These are quite small number giving great chance for rounding errors.

How about a map size of 2500 * 2500
Your ships travel at a speed of 10 units per turn.
values are stored as an Int.
That should take care of most of the rounding errors.
If we can trust the Map Generator to never create a map where a distance is exactly halfway between our ships speed (be it 1 units or 10 units)
(for eaxample: 2.5 or 25 )
I think the distances can then calculated correctly on any language/platform.

Do we still have the same problems then?
(Might solve a lot of the parser-errors in the starter packages too)

* Not very becoming of a programmer, I am not too good at Math.
Math always seemed more of a trial and error science to me. *
temp_dummy
Colonel
 
Posts: 87
Joined: Sat Sep 11, 2010 6:00 pm

Re: Game mechanics question answered!

Postby delt0r » Sun Sep 19, 2010 2:49 pm

Terr yes your right... posting before thinking... sorry

If bots and servers run compliant IEEE floating point then everything will agree. However by default java does while C++ will not. Then there is an issue of internal precision. I use doubles. Clarification would be good.
It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

PreviousNext

Return to Strategy

Who is online

Users browsing this forum: No registered users and 1 guest

cron