[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/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 - I'm working on C , how can i test it in my pc ?

It is currently Wed Jan 17, 2018 9:19 am Advanced search

I'm working on C , how can i test it in my pc ?

Topics about starter packages, visualizer or any other third party tools.
Please submit new language requests in the Language Request Forum.

I'm working on C , how can i test it in my pc ?

Postby black_out » Sat Oct 29, 2011 6:43 am

I'm trying some codes , but i have to wait to server to make challange for me , and another match takes about 6 hours;
Is there any way to play my code in my pc , i saw tools section , but it written in python , if i can use , how can i use ?

if i'm saying silly things , forgive me , i'm just new in here , i couldnt find the solution :D
black_out
Cadet
 
Posts: 3
Joined: Sat Oct 29, 2011 6:31 am

Re: I'm working on C , how can i test it in my pc ?

Postby infernalmachine » Sat Oct 29, 2011 8:32 am

infernalmachine
Lieutenant-Colonel
 
Posts: 48
Joined: Fri Oct 21, 2011 2:25 pm
Location: Toronto, Canada

Re: I'm working on C , how can i test it in my pc ?

Postby black_out » Sat Oct 29, 2011 9:45 am

Thanks a lot my friend, that s working , i will tell to my friends to read your post, your reply is very helpful , i hope we will challenge one day :)
black_out
Cadet
 
Posts: 3
Joined: Sat Oct 29, 2011 6:31 am

Re: I'm working on C , how can i test it in my pc ?

Postby black_out » Sat Oct 29, 2011 10:03 am

and i have a question :D is there any commands that show my code analysis , statistics or something else ? and again thank you for your reply..
black_out
Cadet
 
Posts: 3
Joined: Sat Oct 29, 2011 6:31 am

Re: I'm working on C , how can i test it in my pc ?

Postby infernalmachine » Sat Oct 29, 2011 9:16 pm

I'm not exactly sure. I use the C++ starter package, and the C package may handle it differently.

Check your make file for a comment line that says to uncomment the next line if you want debug output. Then in your bot.c
file you should find, in the function that runs every turn of the game (makeMoves() or something), a line at the top and another at the bottom (probably a call to bug() ) which are writing things to a file (debug.txt). You can recognize the one at the end of makeMoves because it will be outputting a phrase like "time taken". The debug function should be defined in bug.h.

Anyway, it will output the game map each turn along with the time your turn took, for each turn into a debug.txt file in the same directory as your program. Once you get it working, you can use the same bug function inside your code to output whatever you need to see (and even comment out the map output if you don't need it).

It's very primitive, but it is usable. Maybe someone else using the C starter package can be more exact about what the functions are called.
infernalmachine
Lieutenant-Colonel
 
Posts: 48
Joined: Fri Oct 21, 2011 2:25 pm
Location: Toronto, Canada

Re: I'm working on C , how can i test it in my pc ?

Postby mpolitzer » Thu Nov 10, 2011 10:31 pm

Something I've found quite useful is the use of fprintf(stderr, ...), this way you can dump things into the terminal.

OBS1: You have to pass -e to the playgame.py for it to work.
OBS2: Your debug messages will get mixed with the engine.
mpolitzer
Cadet
 
Posts: 2
Joined: Thu Nov 10, 2011 7:13 pm

Re: I'm working on C , how can i test it in my pc ?

Postby Scryer » Fri Nov 11, 2011 3:50 pm

To address the OP's first point: yes, 6 hours is too long to wait for an official match. However, there are other TCP-based ants servers that you can use to test your bot, and you can get into a game in seconds or minutes instead of hours. The bots are not matched very much by skill -- I usually get thrashed rather quickly by the more serious developers.

I use fluxid - here's how -- http://ants.fluxid.pl/howto

Unlike the main server, you just send it your executable rather than the whole zip package.
Scryer
Colonel
 
Posts: 72
Joined: Wed Nov 09, 2011 5:40 pm


Return to Starter Packages & Tools

Who is online

Users browsing this forum: No registered users and 1 guest

cron