We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Scent Tracking - A Fast Path Finding Alternative
Page Index Toggle Pages: 1
Scent Tracking - A Fast Path Finding Alternative (Read 1300 times)
Scent Tracking - A Fast Path Finding Alternative
Aug 17th, 2009, 12:26pm
 
I came up with a scent tracking method based on some AI stuff involving ant bots that I saw years ago.

http://www.robotacid.com/PBeta/scent_map/index.html

It allows you to do some extremely fast path finding by letting the player do most of the work for you.

I've already used it in a commercial platform game and it worked quite well. I was playing Benhem's Wayfarer recently (I'm researching doing a platform game version of Rogue) and was looking at his To Do List, and the mention of smell being a game factor reminded me I hadn't got round to sharing this useful tool yet.
Re: Scent Tracking - A Fast Path Finding Alternative
Reply #1 - Aug 17th, 2009, 1:05pm
 
Hey St33d,

Neat.  If you allow the scent trail to "spread out" by repeatedly setting each grid's scent value (as an int) to (maximum neighbor scent value - 1) and point ants toward increasing scent values, you'll have the entirety of Wayfarer's current track-the-player code.

On a side note, I've been working on A* pathfinding instead, since I'd like to be able to track objects other than the player...demo:
http://benhem.com/dev/aStarDungie
(assumes familiarity with A* / pathfinding terms...press space to toggle dungeon/noisemap mode.)

Also, I was recently introduced to "Langton's Ant," which you might find interesting if you haven't met:
http://en.wikipedia.org/wiki/Langton's_ant

Edit -- just saw your A* page -- I can't get the applet working, but the bit about using an int with a unique "search id" instead of a "closed" bool is a nice touch.  Dijkstra's demo worked fine, by the way.

--Ben
Re: Scent Tracking - A Fast Path Finding Alternative
Reply #2 - Aug 17th, 2009, 5:03pm
 
You guys might be interested in this.  Friend has used it in a game to great success.

http://scalablegamedesign.cs.colorado.edu/wiki/Collaborative_Diffusion
Page Index Toggle Pages: 1