[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/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 - Visualising AI state

It is currently Tue Jun 27, 2017 12:14 am Advanced search

Visualising AI state

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

Re: Visualising AI state

Postby deccan » Wed Nov 30, 2011 7:58 am

deccan
Lieutenant
 
Posts: 18
Joined: Tue Nov 30, 2010 1:30 am

Re: Visualising AI state

Postby akrewTik » Wed Nov 30, 2011 7:16 pm

Hi,

I've got a problem with the git install :

git clone git://github.com/j-h-a/aichallenge.git ./aichallenge ==> OK
cd aichallenge ==> OK
git checkout vis_overlay == > OK
git submodule init ==> OK
git submodule update ==> OK
cd ants/visualizer ==> OK
ant jar ==> ERROR "sh.exe" : ant: command not found
ant run-visualizer

Does somebody have encountered the same error ?

Thanks !
akrewTik
Cadet
 
Posts: 6
Joined: Thu Nov 24, 2011 9:36 pm

Re: Visualising AI state

Postby jab_bott » Wed Nov 30, 2011 8:03 pm

Hi akrewTik,

You don't have to compile the Java visualizer - that is only if you want to use the real-time streaming visualizer. You can run your games and view them in the browser-based visualizer just fine without compiling anything. In the instructions, just stop before the "Stand-alone real-time streaming visualizer" heading.

If you still want to compile the Java visualizer: It seems that your error is because 'ant' is not installed. 'ant' is a build tool - not part of this aichallenge project, the 'ant' name is just a coincidence. I'm not a windows user, but I'm guessing you're using cygwin.. this stackoverflow question might help you to install 'ant' on windows: http://stackoverflow.com/questions/4724 ... -whys-that

Alternatively if you really want to get the Java visualizer to see games as they play, you could look through the aichallenge/ants/visualizer/build.xml file (that's the makefile for ant) and figure out the commands it's executing to build and copy the .jar file to the deploy directory. Or you could get someone you trust who has compiled it already to send you the .jar file.
jab_bott
Lieutenant-Colonel
 
Posts: 44
Joined: Wed Oct 26, 2011 11:55 pm

Re: Visualising AI state

Postby akrewTik » Thu Dec 01, 2011 7:17 am

Ok, thanks. I was wandering why it was called ant since i hadn't found any ant.cmd or ant.exe file in aichallenge :)

Inthe beginning i'll stay with the browser-based visualizer. Thank you for your great job and your fast answers !

Keep going !
akrewTik
Cadet
 
Posts: 6
Joined: Thu Nov 24, 2011 9:36 pm

Re: Visualising AI state

Postby jab_bott » Tue Dec 06, 2011 11:06 am

I had an interesting pull request with some modifications, but I want to find out how people are using this first as the modifications could break some people's visualizations...

The suggested change is to draw the ants on top of the visualizations - this can be useful to see your ants clearly, but it can also mask information that you're drawing onto ants. Also, you can always NOT draw tile overlays for tiles with an ant on it if you want to see the ants better. It could also be modified so that some commands get drawn behind the ants and others on top, for example the tile command might get drawn behind the ants and all other commands on top - this would be useful if people are using tile to draw heat-maps and using line/tileSubTile/star/circle/etc. to draw information on top of their ants.

So what are your thoughts on this? What commands are you using and how? Should all commands get drawn on the same layer or some on other layers between the map/ants? Should the fog remain on the very top or might it be useful to have some commands drawn over the fog? Would it be useful to have a setLayer command and define some layers?

I need some input on this to make a decision that will suit everyone.

Thanks,
J
jab_bott
Lieutenant-Colonel
 
Posts: 44
Joined: Wed Oct 26, 2011 11:55 pm

Re: Visualising AI state

Postby Tortortor » Tue Dec 06, 2011 11:26 am

Hi,

From my point of view only circles is used to mark ants somehow. So my vote for all overlays be drawn under ants and only circles on top.

Another suggestion is divide all overlays into blocks and turn on/off those block by buttons in visualizator:
- paths
- map exploration
- fights
- etc.
Tortortor
Major
 
Posts: 37
Joined: Fri Oct 21, 2011 12:10 pm

Re: Visualising AI state

Postby bugnuts » Tue Dec 06, 2011 1:52 pm

If anyone is interested the version with the changed order is on the vis_overlay branch on https://github.com/jcdny/aichallenge
Also if anyone wants to see what drawing fog first looks like it's a simple change to CanvasElement.js -- simply move the block
starting with the comment "// fog" in the function CanvasElementAntsMap.prototype.draw up to just after the map is drawn (the
line after "// draw map" at the top of that function).

I do a lot of heat maps and for them its much nicer to draw the ants last; obscuring subtiles is definitely an issue though. In an ideal world it might be nice to have something like a setlayer command that lets you draw to different layers (and I think that could be done pretty efficiently if you maintained color state per layer and had the overlay data stored as an array by player then layer).
bugnuts
Lieutenant
 
Posts: 11
Joined: Mon Oct 31, 2011 3:02 pm

Re: Visualising AI state

Postby jab_bott » Tue Dec 06, 2011 2:25 pm

I think the best solution will be to add a setLayer command, this way, any commands can be drawn on any layer. We can have three layers:

0 - Draws behind the ants.
1 - Draws above the ants.
2 - Draws above the fog.

The default layer value (if you don't ever use the setLayer command) should be 1, so that existing visualizations remain unaffected. Heat-maps or terrain knowledge/info can then be drawn on layer 0, ant data on layer 1, and anything you want to see always, even when fog is displayed can use layer 2.

This shouldn't take long to implement - I can do it this evening... It can be done fairly optimally without any complex re-structuring of the data.

The only thing I'm a bit unsure about is how should setLineWidth and set*Color commands work? Should they set it globally or only on the current layer? And if per-layer, should switching to a layer restore the previous values for that layer or should it be undefined? Any suggestions?
jab_bott
Lieutenant-Colonel
 
Posts: 44
Joined: Wed Oct 26, 2011 11:55 pm

Re: Visualising AI state

Postby Darhuuk » Tue Dec 06, 2011 2:32 pm

Darhuuk
Colonel
 
Posts: 71
Joined: Wed Nov 16, 2011 12:58 pm

Re: Visualising AI state

Postby jab_bott » Wed Dec 07, 2011 2:30 am

Ok... setLayer and corresponding alias (sl) are implemented.

This commit here:
https://github.com/j-h-a/aichallenge/tr ... 3b9a9ccdcd

Docs here:
https://github.com/j-h-a/aichallenge/bl ... OVERLAY.md

bugnuts: Regarding the fog: I don't think this is something that should be controlled from the bot, but it would be nice to have a GUI in the Visualizer to modify where the fog gets drawn... I'll have a further think about that.

Edit: P.S. Please test extensively and let me know of any bugs, I know you will :D
jab_bott
Lieutenant-Colonel
 
Posts: 44
Joined: Wed Oct 26, 2011 11:55 pm

PreviousNext

Return to Starter Packages & Tools

Who is online

Users browsing this forum: No registered users and 2 guests

cron