It is currently Wed Jun 19, 2013 10:56 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 Darhuuk » Wed Dec 07, 2011 12:04 pm

bluegaspode wrote:As my Ants reduce the diffusion to implement the 'collaboritive' part of the diffusion, I often had areas with no diffusion at all. The scent was 'blocked away' from certain parts of the map by other ants - typically around the hill when there are many ants.


What I do is giving an "antObfuscation" factor to my diffusion function indicating how much scent should be let through (so a better name would actually be antPassthrough). For example, when razing hills, I don't want my ants to block the scent a lot, all attacking ants should take more or less the same path, so my antObfuscation = 0.8 for that. For food however, I don't want that, so there I have an antObfuscation = 0.01. I never set it to 0 so everything gets blocked though, so a little bit of scent will always get to every ant on the map.
Darhuuk
Colonel
 
Posts: 71
Joined: Wed Nov 16, 2011 12:58 pm

Re: Ignoring path finding and using collaborative diffusion

Postby rossxwest » Wed Dec 07, 2011 1:06 pm

If you don't start with a fresh map every turn, how do you remove/move scent from an object, such as food, which has moved or is gone?
User avatar
rossxwest
Cadet
 
Posts: 3
Joined: Wed Dec 07, 2011 1:05 pm

Re: Ignoring path finding and using collaborative diffusion

Postby Darhuuk » Wed Dec 07, 2011 1:17 pm

rossxwest wrote:If you don't start with a fresh map every turn, how do you remove/move scent from an object, such as food, which has moved or is gone?


Let's say you picked up a piece of food. So now there is lingering scent hanging around, however, the source of the scent (i.e. the food) is gone. So when you run your diffusion, the averaging will make the scent at all squares around this ex-food source go down. If you run your diffusion enough, the scent will eventually completely go away, since there is no source to keep giving of scent anymore.
Darhuuk
Colonel
 
Posts: 71
Joined: Wed Nov 16, 2011 12:58 pm

Re: Ignoring path finding and using collaborative diffusion

Postby erdman » Sat Dec 10, 2011 10:39 pm

Tuning the parameters of the diffusion algorithm (ie relative weights of different scent-producers, pass-thru percentage of agents, the diffusion coefficient to use, number of diffusion steps per turn) seems, uh, tedious. Correct? -- or am I doing it wrong?

Separately, should one track multiple scents separately, or is their a case for keeping separate scents? Specifically, I'm wondering if scents given off by friendly agents (repellent scents, to prevent ants from bunching) should be separate from goal-oriented scents, like for food and enemy hills?
erdman
Major
 
Posts: 34
Joined: Thu Oct 27, 2011 12:52 am

Re: Ignoring path finding and using collaborative diffusion

Postby carlos.guia » Sun Dec 11, 2011 1:43 am

I keep each scent separated, food, explore, enemy hill, etc. And then combine them in a weighted manner when deciding the moves, this gives me the flexibility to use dynamic weights, like some ants are more attracted to food, some to enemy hills, and so on; depending on the state of the game.
carlos.guia
Lieutenant
 
Posts: 19
Joined: Mon Oct 31, 2011 11:19 pm

Re: Ignoring path finding and using collaborative diffusion

Postby pkmiec » Sun Dec 11, 2011 9:27 am

I also keep scents separated and combine them differently depending on type of ant and the state of the game.

It's interesting to hear that people use diffusion for food. That never really worked for me. Instead, I use A* to find the closest ant for each food which allows me to guarantee only one ant going towards each food. The paths are really short, so there is no time problem.
pkmiec
Lieutenant
 
Posts: 11
Joined: Sun Dec 11, 2011 9:11 am

Re: Ignoring path finding and using collaborative diffusion

Postby codetiger » Sun Dec 11, 2011 10:05 am

I've used diffusion with a small trick.

Am using 2 different diffusion maps. First map will spread source scent only until it sees first ant. And the other map will spread until it becomes 0. So when you need multiple ants to work together for a source (hill), you have to use second map. If you want your source(food, explore) to attract only one ant, you have to add it to the first map. And you have to decide how to use both maps to direct the ants.

Check the performance here... Orange is the new exploration bot.
http://paste.aichallenge.org/i1juJ/
codetiger
Lieutenant-Colonel
 
Posts: 47
Joined: Sun Aug 21, 2011 4:47 am

Re: Ignoring path finding and using collaborative diffusion

Postby rossxwest » Sun Dec 11, 2011 9:18 pm

User avatar
rossxwest
Cadet
 
Posts: 3
Joined: Wed Dec 07, 2011 1:05 pm

Re: Ignoring path finding and using collaborative diffusion

Postby agent_smith » Sun Dec 11, 2011 9:25 pm

erdman wrote:Specifically, I'm wondering if scents given off by friendly agents (repellent scents, to prevent ants from bunching) should be separate from goal-oriented scents, like for food and enemy hills?


That's the "collaborative" in "collaborative diffusion". If you ants don't conduct scent, the scent around each is weaker and they don't group.

The next trick for me was to enable scent-conducting in case there's need for ants to group.
agent_smith
Colonel
 
Posts: 54
Joined: Mon Nov 28, 2011 2:28 pm

Re: Ignoring path finding and using collaborative diffusion

Postby stupidquestions » Thu Dec 15, 2011 6:20 pm

For those of you who are using diffusion for most of the stuff but something else for battle, locally: How do you bring the two together? When, exactly, do your ants switch to "battle mode"?
stupidquestions
Captain
 
Posts: 23
Joined: Wed Nov 16, 2011 1:02 pm

PreviousNext

Return to Strategy

Who is online

Users browsing this forum: No registered users and 1 guest