[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/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 - Ignoring path finding and using collaborative diffusion

It is currently Tue Oct 23, 2018 7:27 pm Advanced search

Ignoring path finding and using collaborative diffusion

Share and discuss ideas for your entries here.

Re: Ignoring path finding and using collaborative diffusion

Postby stupidquestions » Wed Nov 23, 2011 1:05 pm

:D

Well, I'm just starting out really... I tried putting my "move to" locations in a vector and checking if a location was "taken" before assigning it to another ant's move (something similar to what's in the tutorial)... It didn't really work well, I realized how I could improve it but concluded that it would be a bit of a drag coding that stuff. And it's not really in the spirit of diffusion.

Aaand I tried simply assigning food value (and all the other values, but I still didn't write the code that makes these values relevant, my ants are constantly in "food mode") 0 to my ants' locations, but the problem with that was that my ants (obviously) didn't want to even come close to each other, plus it sometimes stopped them in getting food which was close to them.
stupidquestions
Captain
 
Posts: 23
Joined: Wed Nov 16, 2011 1:02 pm

Re: Ignoring path finding and using collaborative diffusion

Postby mac » Wed Nov 23, 2011 11:53 pm

mac
Brigadier-General
 
Posts: 151
Joined: Mon Oct 31, 2011 6:39 am

Re: Ignoring path finding and using collaborative diffusion

Postby stupidquestions » Thu Nov 24, 2011 12:16 am

Well, if I set my ants to dampen the smell a lot, they won't approach each other, which means they'll be isolated and easier to destroy by the enemy. On the other hand, if I set them to dampen the smell too little, they'll collide with each other a lot.

Anyway, thanks for the answer. :)
stupidquestions
Captain
 
Posts: 23
Joined: Wed Nov 16, 2011 1:02 pm

Re: Ignoring path finding and using collaborative diffusion

Postby erdman » Thu Nov 24, 2011 12:40 am

After reading this thread and the original linked paper, I implemented something that I called 'diffusion', but reading elsewhere, others call what I have implemented 'wavefront search'.

What is the 'collaborative' part of collaborative diffusion? How does it compare to wavefront search?
erdman
Major
 
Posts: 34
Joined: Thu Oct 27, 2011 12:52 am

Re: Ignoring path finding and using collaborative diffusion

Postby bluegaspode » Thu Nov 24, 2011 7:01 am

the collaborative part is by the 'dampening' described above.

Two ants side by side will soon go into two different directions to gather food. Or avoid enemies automatically while still heading for the food tile (with a very limited set of diffusions per round).
A good example is in the paper from the first post from the PacMan game, where two enemies of PacMan will automatically choose different ways to circle the PacMan.

Here are some cool animations: http://scalablegamedesign.cs.colorado.e ... _Diffusion

Wavefront Search will find you shortest paths, so (based on your implementation) two ants might always follow the same food.
If you want to avoid that you'd need multiple waves for each ant and will lose a lot of computation time of you a loads of ants.
bluegaspode
Colonel
 
Posts: 51
Joined: Mon Nov 07, 2011 8:38 am

Re: Ignoring path finding and using collaborative diffusion

Postby tokugawa » Thu Nov 24, 2011 2:31 pm

tokugawa
Cadet
 
Posts: 2
Joined: Thu Nov 24, 2011 2:25 pm

Re: Ignoring path finding and using collaborative diffusion

Postby Darhuuk » Thu Nov 24, 2011 8:15 pm

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

Re: Ignoring path finding and using collaborative diffusion

Postby tokugawa » Fri Nov 25, 2011 4:06 am

tokugawa
Cadet
 
Posts: 2
Joined: Thu Nov 24, 2011 2:25 pm

Re: Ignoring path finding and using collaborative diffusion

Postby zanirzrold » Fri Nov 25, 2011 4:37 am

First of all, you should be able to have a minimum of 100 diffusions a turn with no problem (I can do about ~300 although only do 200 to make sure I don't time out). If you're doing multiple maps for different scents, thats~20-30 diffusions per map. If you're not this efficient, figure out a better way to do it. I'll leave the implementation to you.

Second, if you're having problems with enemy hills, here's a suggestion, but certainly not the only way. Think of ways you can figure out if you just killed a hill. If you did, reset your enemy hill scent to 0 across the map, reset your enemy hills, and diffuse 30-40 times to get the scents back out (this shouldn't take a very long time, because most of your map will be 0s). Conversely, you could also give a negative scent to the hill just captured (which then as it diffuses should go to zero and pull everything around it to zero as well). Experiment!
zanirzrold
Lieutenant
 
Posts: 11
Joined: Sun Nov 06, 2011 9:07 pm

Re: Ignoring path finding and using collaborative diffusion

Postby Darhuuk » Fri Nov 25, 2011 10:18 am

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

PreviousNext

Return to Strategy

Who is online

Users browsing this forum: No registered users and 2 guests

cron