# Pack Behaviour (Dogs\Hounds)

This topic is 5030 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am struggling to get good behaviour for a pack of dogs. The dogs keep running into each other or they go straight through each other. I think they might need to 'see' the other dogs. They are meant to be chasing a moving object, controlled by arrow keys. When they can't see the object, they slowly head towards a non-moving object and gaurd it. The moving object has to get to the non-moving object without touching the dogs. Any suggestions?

##### Share on other sites
I believe you're looking for 'swarming and flocking behaviour'. There's been lots of research in this area, so Google should provide all you need. Lots of example apps out there to play with, too.

##### Share on other sites
As Morbo says, you could google it or you could just go to the source and read Craig Reynolds paper "Steering Behaviors for Autonomous Characters", which is available online here: http://www.red3d.com/cwr/steer/

Mike

##### Share on other sites
if they bump into eachother, make sure your collision detection is good. Make them all move towards the same point, and they should come together into a flock. If you want them to stop, move the point they move towards to the average position of each dog. The way to do it varies a lot, if it is tile based a different technique may need to be used.

##### Share on other sites
What you need to do, is give it different forces.

For eg. One force, pushes the dogs onto follow a path
The second force, pulls them apart from objects (including other dogs), which increases exponentially as they get closer to something.
The third force, pushes them together as a pack, it increases exponentially, just less so then the second force.
The forth force, is a random force, which keeps every dog moving in the direction it was.

From,
Nice coder

##### Share on other sites
In my own observation of a pack of mostly wild dogs (15-20) I noticed a few things:
-They all bark a lot at each other, almost as if they are shouting at each other
-There are leaders and followers in the pack. Usually the pack leaders influenced the direction the pack moved.
-There were outliers who were around the edges of the pack
-some dogs chased each other around but maintained the general area of the pack

I guess if you're trying to create a simulation of a pack of dogs, you could have a few different properties for each dog.
Instigators: Cause other dogs to bark at them. If the other dogs get mad enough, they chase the dog instigating them.
Leaders: The average location of the pack is more heavily influenced by the location of leaders
Dogs may get leadership points for instigating a lot?
Just some ideas to throw around

##### Share on other sites
These ideas are rather interesting. By the way, do any of you guys know dark basic?

##### Share on other sites
Here's some research on the subject:

http://www.cs.virginia.edu/~dbrogan/Research/GroupBehaviors/

Try reading the papers, then reading the papers cited in the papers. Get a good feel for the overall research that's been done in the field, then decide what you really need and start implementing.

1. 1
Rutin
36
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 101
• 11
• ### Forum Statistics

• Total Topics
632974
• Total Posts
3009660
• ### Who's Online (See full list)

There are no registered users currently online

×