Thrive Game Development
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Thrive Game Development

Development of the evolution game Thrive.
 
HomeHome  PortalPortal  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  
Welcome new and returning members!
If you're new, read around a bit before you post: the odds are we've already covered your suggestion.
If you want to join the development team, sign up and tell us why.
ADMIN is pleased to note that this marquee has finally been updated.
ADMIN reminds you that the Devblog is REQUIRED reading.
Currently: The Microbe Stage GUI is under heavy development
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Quick Links
Website
/r/thrive
GitHub
FAQs
Wiki
New Posts
Search
 
 

Display results as :
 
Rechercher Advanced Search
Statistics
We have 1675 registered users
The newest registered user is dejo123

Our users have posted a total of 30851 messages in 1411 subjects
Who is online?
In total there are 13 users online :: 0 Registered, 0 Hidden and 13 Guests

None

Most users ever online was 443 on Sun Mar 17, 2013 5:41 pm
Latest topics
» THIS FORUM IS NOW OBSOLETE
AI Roam Procedure Emptyby NickTheNick Sat Sep 26, 2015 10:26 pm

» To all the people who come here looking for thrive.
AI Roam Procedure Emptyby NickTheNick Sat Sep 26, 2015 10:22 pm

» Build Error Code::Blocks / CMake
AI Roam Procedure Emptyby crovea Tue Jul 28, 2015 5:28 pm

» Hello! I can translate in japanese
AI Roam Procedure Emptyby tjwhale Thu Jul 02, 2015 7:23 pm

» On Leave (Offline thread)
AI Roam Procedure Emptyby NickTheNick Wed Jul 01, 2015 12:20 am

» Devblog #14: A Brave New Forum
AI Roam Procedure Emptyby NickTheNick Mon Jun 29, 2015 4:49 am

» Application for Programmer
AI Roam Procedure Emptyby crovea Fri Jun 26, 2015 11:14 am

» Re-Reapplication
AI Roam Procedure Emptyby The Creator Thu Jun 25, 2015 10:57 pm

» Application (programming)
AI Roam Procedure Emptyby crovea Tue Jun 23, 2015 8:00 am

» Achieving Sapience
AI Roam Procedure Emptyby MitochondriaBox Sun Jun 21, 2015 7:03 pm

» Microbe Stage GDD
AI Roam Procedure Emptyby tjwhale Sat Jun 20, 2015 3:44 pm

» Application for Programmer/ Theorist
AI Roam Procedure Emptyby tjwhale Wed Jun 17, 2015 9:56 am

» Application for a 3D Modeler.
AI Roam Procedure Emptyby Kaiju4u Wed Jun 10, 2015 11:16 am

» Presentation
AI Roam Procedure Emptyby Othithu Tue Jun 02, 2015 10:38 am

» Application of Sorts
AI Roam Procedure Emptyby crovea Sun May 31, 2015 5:06 pm

» want to contribute
AI Roam Procedure Emptyby Renzope Sun May 31, 2015 12:58 pm

» Music List Thread (Post New Themes Here)
AI Roam Procedure Emptyby Oliveriver Thu May 28, 2015 1:06 pm

» Application: English-Spanish translator
AI Roam Procedure Emptyby Renzope Tue May 26, 2015 1:53 pm

» Want to be promoter or project manager
AI Roam Procedure Emptyby TheBudderBros Sun May 24, 2015 9:00 pm

» A new round of Forum Revamps!
AI Roam Procedure Emptyby Oliveriver Wed May 20, 2015 11:32 am


 

 AI Roam Procedure

Go down 
+2
Djohaal
~sciocont
6 posters
AuthorMessage
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

AI Roam Procedure Empty
PostSubject: AI Roam Procedure   AI Roam Procedure EmptySun Dec 12, 2010 3:47 pm

It was discovered earlier this year that many animals such as sharks and tuna follow a certain mathematical process when roaming around looking for food. This process is called a Levy Flight.
I propose that we use levy Flights for all AI "random roam" procedures, since it's realistic and the math is already there.
Back to top Go down
Djohaal
Learner
Djohaal


Posts : 144
Reputation : 1
Join date : 2010-12-03

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Dec 12, 2010 3:55 pm

Sure, why not. The simpler the function the better to manage it. Now we need a model for herbivores. Anyone wanna watch cows grazing and do a mathematical function of it?
Back to top Go down
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Dec 12, 2010 6:53 pm

Djohaal wrote:
Sure, why not. The simpler the function the better to manage it. Now we need a model for herbivores. Anyone wanna watch cows grazing and do a mathematical function of it?
A cow would just move from plant to plant. However, if it can't find good food, it should use the same auto-roam as a carnivore.
Back to top Go down
Tenebrarum
Society Team Lead
Tenebrarum


Posts : 1179
Reputation : 32
Join date : 2010-10-01
Age : 31
Location : ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySat Dec 18, 2010 9:29 pm

Sorry, forgot to post on the when I first saw it.

Good work. This will probably need tweaking to fit our system, but IRL equations are always loverly.

So, now I'm wondering: is there a similer equation for pathfinding? It's always been an absolute belgium to program in games and failing to get it just right can really break the immersion. I think we may need multiple pathfinding equations though, to represent different levels of intelligence.
Back to top Go down
Commander Keen
Industrial Team Lead
Commander Keen


Posts : 1123
Reputation : 36
Join date : 2010-07-23
Location : Czech Republic (not that anyone would know where it is...)

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Dec 19, 2010 6:50 am

Implementing multiple pathfinding algorithms is pointless, using one and limiting it for dumb creatures would be enough. Now, what algorithm will be used? The old fashioned A*?
Back to top Go down
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Dec 19, 2010 10:30 am

I think for pathfinding we can set up a goal and a starting point, then set up vertices in between. The intelligence/senses of the creature that will help it find the most efficient path would determine h ow many vertices and where they are. This vertice method can be easily adjusted on the fly for moving targets.
Back to top Go down
Commander Keen
Industrial Team Lead
Commander Keen


Posts : 1123
Reputation : 36
Join date : 2010-07-23
Location : Czech Republic (not that anyone would know where it is...)

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Dec 19, 2010 1:48 pm

So navmesh you say?
Back to top Go down
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Dec 19, 2010 2:07 pm

Commander Keen wrote:
So navmesh you say?
I don't know the technical term, but sure.
Back to top Go down
Bashinerox
Programming Team lead
Bashinerox


Posts : 238
Reputation : 8
Join date : 2010-07-07
Age : 35
Location : Australia

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyMon Dec 20, 2010 2:41 am

~sciocont wrote:
I think for pathfinding we can set up a goal and a starting point, then set up vertices in between. The intelligence/senses of the creature that will help it find the most efficient path would determine h ow many vertices and where they are. This


A*

If you don't want creatures to know the correct path all the time, you use an inadmissable heuristic on purpose.


Last edited by Bashinerox on Tue Dec 21, 2010 7:43 am; edited 1 time in total
Back to top Go down
Tenebrarum
Society Team Lead
Tenebrarum


Posts : 1179
Reputation : 32
Join date : 2010-10-01
Age : 31
Location : ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyMon Dec 20, 2010 5:37 pm

Bashinerox wrote:
If you don't want creatures to know the correct path all the time, you use an inadmissable heuristic on purpose.
Sound's like a good plan, though we'll need to get good pathfinding up in the first place. Nothing would be more frustrating than having your creature with perfect sense in it's natural environment running into walls.

We also need to make sure that creatures give up, as in, not persistantly try to walk through a cliff face when you tell him to. We must make sure that even those with the worst pathfinding don't dash the immersion of the experience.
Back to top Go down
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyMon Dec 20, 2010 6:45 pm

This brings up an interesting point- how are our creatures really going to be represented through movement? In most games, everything with legs is really just like a box with the animation of walking. How will our procedural gaits be, comparatively?
Back to top Go down
Bashinerox
Programming Team lead
Bashinerox


Posts : 238
Reputation : 8
Join date : 2010-07-07
Age : 35
Location : Australia

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyTue Dec 21, 2010 7:45 am

A* is a pathfinding algorithm
Back to top Go down
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyTue Dec 21, 2010 11:08 am

Bashinerox wrote:
A* is a pathfinding algorithm
So you're saying we should use it for basic pathfinding? It seems pretty straightforward, but can we extrapolate it into 3 dimensions for swimming/flying? We would just need to use a 3d tesselation (probably a cube) instead of a 2D one, right?
Basics of A*

Edit: Just got a great idea while reading that page. Could we, instead of using straight moves between nodes, connect those nodes with a spline curve?
Back to top Go down
Tenebrarum
Society Team Lead
Tenebrarum


Posts : 1179
Reputation : 32
Join date : 2010-10-01
Age : 31
Location : ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyTue Dec 21, 2010 4:54 pm

~sciocont wrote:
Edit: Just got a great idea while reading that page. Could we, instead of using straight moves between nodes, connect those nodes with a spline curve?

Oh God please. I'm so terribly sick of units in games getting awkward graphical glitches because there movement is straight line based, instead of the more natural curve.
Back to top Go down
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyTue Dec 21, 2010 5:01 pm

Tenebrarum wrote:
~sciocont wrote:
Edit: Just got a great idea while reading that page. Could we, instead of using straight moves between nodes, connect those nodes with a spline curve?

Oh God please. I'm so terribly sick of units in games getting awkward graphical glitches because there movement is straight line based, instead of the more natural curve.
The question is if the spline will be too complex, which it shouldn't be. Also, if you have a curve, it may be drawn through obstacles that the straight line missed.
Back to top Go down
Darkov
Newcomer
Darkov


Posts : 58
Reputation : 1
Join date : 2010-09-23

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Jan 02, 2011 11:13 am

Nice find!
I made a small program to see exactly how will this work and from what i observed, this represents the roaming patterns of some animals over a very large amount of days(over 5,700 days - wiki), which, in my opinion, will be hard to use for that matter. Then i tested another "algorithm" i created for animal roaming, that works based on the facing of the animal. The animal will always go forward(at its facing), but its facing will change. Facing = direction. That way it has a smoother direction change and it looks more realistic to me. This can be used as in real time roaming.
This is the Levy flight simulation:
https://2img.net/r/ihimizer/img707/6769/screenshot100nk.png
And this is my algorithm simulation:
https://2img.net/r/ihimizer/img339/9689/screenshot101y.png
This is the program, so you can test it too:
http://www.mediafire.com/?9k1d68eoq63h9nt
SPACE - restarts current simulation
LEFT ARROW - start a new Levy flight simulation
RIGHT ARROW - start my algorithm
Back to top Go down
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Jan 02, 2011 12:06 pm

Nice work! Also, congrats on 42 posts. The levy flight looks good, and the second algorithm looks excellent. Could you run the second one for a little longer to see if it generates more levy-like bundles?
Back to top Go down
Commander Keen
Industrial Team Lead
Commander Keen


Posts : 1123
Reputation : 36
Join date : 2010-07-23
Location : Czech Republic (not that anyone would know where it is...)

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Jan 02, 2011 2:21 pm

While your algorithm looks great on paper like this, but I fear ingame it might look weird for animals not moving in fully 3d environment (ie land animals). It could be great for aerial and water animals, though.

Land animals would often stop, scanning the environment, and then go in a random direction. While this looks weird on map trails like yours, it would give a lot more sense ingame.
Back to top Go down
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Jan 02, 2011 4:43 pm

Commander Keen wrote:
While your algorithm looks great on paper like this, but I fear ingame it might look weird for animals not moving in fully 3d environment (ie land animals). It could be great for aerial and water animals, though.

Land animals would often stop, scanning the environment, and then go in a random direction. While this looks weird on map trails like yours, it would give a lot more sense ingame.
he can simply add in "stops" in the algorithm. Just put one in at random intervals of points.
Back to top Go down
Darkov
Newcomer
Darkov


Posts : 58
Reputation : 1
Join date : 2010-09-23

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Jan 02, 2011 7:59 pm

Ok here is my algorithm ran for a longer period of time:
https://2img.net/r/ihimizer/img193/5160/screenshot102kj.png
I also added the random stop to my algorithm, to see it in action, download the new version of the program:
http://www.mediafire.com/?qjreha63516fe0q
And press the DOWN ARROW key to start the new simulation. The other hot keys still do the same things.
And now the program wont start to lag and eventually crash if you run it for too long.
Back to top Go down
~sciocont
Overall Team Lead
~sciocont


Posts : 3406
Reputation : 138
Join date : 2010-07-06

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptySun Jan 02, 2011 9:43 pm

seems to be working great
Back to top Go down
Commander Keen
Industrial Team Lead
Commander Keen


Posts : 1123
Reputation : 36
Join date : 2010-07-23
Location : Czech Republic (not that anyone would know where it is...)

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyMon Jan 03, 2011 5:58 pm

Is there any way to zoom in?
Back to top Go down
Darkov
Newcomer
Darkov


Posts : 58
Reputation : 1
Join date : 2010-09-23

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyTue Jan 04, 2011 6:09 am

there is a way in this version now:
http://www.mediafire.com/?k5ch22e212589to

Press CTRL to zoom in and zoom out. When you zoom in use the AWSD keys on your keyboard to move the camera.
You can't zoom in the Levy Flight simulation, because its already zoomed.
Back to top Go down
Commander Keen
Industrial Team Lead
Commander Keen


Posts : 1123
Reputation : 36
Join date : 2010-07-23
Location : Czech Republic (not that anyone would know where it is...)

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyTue Jan 04, 2011 7:37 pm

Would it be possible to change the Levy flight to this?

http://en.wikipedia.org/wiki/File:LevyFlight.svg

From the Wikipedia page it seems like it's only changing a few variables.
Back to top Go down
Darkov
Newcomer
Darkov


Posts : 58
Reputation : 1
Join date : 2010-09-23

AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure EmptyTue Jan 04, 2011 8:16 pm

In my simulation, the variables are randomized each step, in the wiki, they are always the same.
its just a matter of randomness.
Back to top Go down
Sponsored content





AI Roam Procedure Empty
PostSubject: Re: AI Roam Procedure   AI Roam Procedure Empty

Back to top Go down
 
AI Roam Procedure
Back to top 
Page 1 of 1
 Similar topics
-
» Autotroph Evolution Distribution Procedure

Permissions in this forum:You cannot reply to topics in this forum
Thrive Game Development :: Development :: Programming :: Technical Discussion-
Jump to: