[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 engine in C++

It is currently Tue Oct 17, 2017 4:50 pm Advanced search

Game engine in C++

Code won't compile? Found a bug? Post here!

Re: Game engine in C++

Postby igner » Tue Sep 14, 2010 6:49 pm

Albert,
as for me, the question is "does it worth to port playgame.jar to c++" ?
I'm just too lazy to port to c++ by myself ( especially now when you already did this :) )

so, could you please show benchmarks of playgame.jar vs c++ engine (tested on your c++ bots) ?

regarding speed of viewer, thats really cool but i'm rather interested in thousands of battles of my bot vs other bots :)
igner
Lieutenant
 
Posts: 10
Joined: Sun Sep 12, 2010 10:54 am

Re: Game engine in C++

Postby albert » Tue Sep 14, 2010 8:50 pm

Haven't you seen my previous post? I posted some benchmarks about that exactly.
albert
Lieutenant-Colonel
 
Posts: 44
Joined: Sun Sep 12, 2010 9:11 pm

Re: Game engine in C++

Postby igner » Tue Sep 14, 2010 9:02 pm

Oops :?
igner
Lieutenant
 
Posts: 10
Joined: Sun Sep 12, 2010 10:54 am

Re: Game engine in C++

Postby RebelXT » Wed Sep 15, 2010 1:08 am

RebelXT
Colonel
 
Posts: 81
Joined: Fri Sep 10, 2010 2:05 pm

Re: Game engine in C++

Postby albert » Wed Sep 15, 2010 1:49 am

albert
Lieutenant-Colonel
 
Posts: 44
Joined: Sun Sep 12, 2010 9:11 pm

Re: Game engine in C++

Postby Paskal_07 » Wed Sep 15, 2010 8:12 am

Information about Google AI Challenge: Galcon in russian — , — добро пожаловать!
Paskal_07
Cadet
 
Posts: 6
Joined: Tue Sep 14, 2010 5:47 pm
Location: Russia, Moscow

Re: Game engine in C++

Postby albert » Wed Sep 15, 2010 12:18 pm

@Paskal: Fixed that, it should work now without any changes.
albert
Lieutenant-Colonel
 
Posts: 44
Joined: Sun Sep 12, 2010 9:11 pm

Re: Game engine in C++

Postby albert » Thu Sep 16, 2010 12:20 am

albert
Lieutenant-Colonel
 
Posts: 44
Joined: Sun Sep 12, 2010 9:11 pm

Re: Game engine in C++

Postby igner » Thu Sep 16, 2010 1:30 am

okay, that's me again :)

Albert
first, coming back to your benchmark results...
Am I correct that you compare "X turns of simulation on Java engine" vs "simple run of your C++ engine, without any bots" ???
If so, "10 sec vs 0.3 sec" have absolutely no sense...

Here's my benchmark results (exact 10'000 turns, "echo c++ bot" vs "echo c++ bot"):

Windows
Java engine: 22 seconds
C++ engine: 15 seconds
so, C++ is 46% faster

Linux (Ubuntu 10.04)
Java engine: 77 seconds
C++ engine: 25 seconds
so, C++ is 208% faster

Well, don't look that in Windows i have better overall result, Linux is running on VMWare, I suppose that is the reason of slower run.

P.S. Results for "Java echo bot" are the same +/- 1 second (because echo bot only replies with "go", there is no logic inside for this test).
igner
Lieutenant
 
Posts: 10
Joined: Sun Sep 12, 2010 10:54 am

Re: Game engine in C++

Postby delt0r » Thu Sep 16, 2010 7:13 am

I don't want to descend into a flame war (nothing wrong with C++ or any other lang for that matter). But i just wanted to say that at least the java player i looked at is rather awful. Its basically C in Java clothing. The worst way to write java is like C. My reimplementation in java is faster (3m24sec for PlayGame.jar and 2m24 for my player over all 100 maps with my bots (also java and also restarting the whole jvm for each bot for each game)) but most of the time is not the game engine, its the bots and the default bots have the same problem. Also bench marking with a echo bot is not going to test any of the fleet and combat resolution code which is where the performance problems probably are. Finally this is mostly IO bound.

For my testing i have bots that don't need to be "restarted". The process can be kept alive and the game engine sends a restart message. This makes a big difference with batch jobs. Especially with java.

Generally C++ and java have similar performance with similar levels of code quality (baring jvm warm up time).

Also just a quick note. The worse part of the default bots etc in the original java is reading 1 char at a time and appending it to a string from all input streams. This is many many times slower than using a readline method. Just fix that and most of the performance difference will go away.
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 Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron