Understanding Seek Steering Behavior in Autonomous Characters

In summary, the conversation discusses the concept of Seek as a behavior for autonomous characters, as well as its calculation in the book "Programming Game AI by example". The equation for Seek involves subtracting two velocity vectors to obtain a force, although a constant may need to be applied for realistic implementation. The purpose of scaling the desired velocity vector to the maximum speed is also questioned.
  • #1
Metro_Mystery
10
0

Homework Statement



I'm having trouble understanding the physics equations related to Steering Behaviors For Autonomous Characters (present in the book "Programming Game AI by example").

For those that don't know- Seek is a kind of behavior whereby an object with a given mass, current position & velocity attemps to seek to a target position.

Homework Equations



In the book, Mat Buckland calculates Seek like so (in Pseudocode)

def Seek()
DesiredVelocity = Normalize(TargetPos - VehiclePos) * VehicleMaxSpeed
SteeringForce = DesiredVelocity - VehicleVelocity
return SteeringForce

The Attempt at a Solution



Seek is stated, in the book- to return a steering force, which is "the force required, when added to the agents current velocity vector, gives the desired velocity.

How does the subtraction of two velocity vectors suddenly become a force?

My heads in a spin- any help is greatly appreciated!
 
Physics news on Phys.org
  • #2
If you subtract the two velocity vectors, then you get a vector which points in direction you want the force to point. Formally, you would need to multiply by something (a constant, possibly) that has dimensions of mass over time to get a force. But the computer doesn't care about actual units, and the constant might as well be 1. So that's why a difference in velocities could be a force, or acceleration. A realistic implementation of that AI would probably need to have a constant to scale the SteeringForce to give good behavior, but that's something that would need to be experimented with.
 
  • #3
Thanks for the great answer, I understand now.

Also- what exactly is the point of scaling the desired velocity vector to max speed? From what I can see- it will affect the direction as well as the magnitude of the output vector.
 
Last edited:

Related to Understanding Seek Steering Behavior in Autonomous Characters

1. What is Seek Steering Behavior in AI?

Seek Steering Behavior is a type of artificial intelligence algorithm that allows an agent to move towards a specific target or goal. It is commonly used in video games and robotics to simulate realistic movement and navigation.

2. How does Seek Steering Behavior work?

Seek Steering Behavior works by calculating the direction and velocity needed for an agent to move towards a target. This is achieved by subtracting the agent's position from the target's position and normalizing the resulting vector. The agent then adjusts its movement accordingly to reach the target.

3. What are the advantages of using Seek Steering Behavior?

One advantage of using Seek Steering Behavior is that it allows for smooth and natural movement towards a target. It also takes into account obstacles and other agents in the environment, making it useful for navigating complex environments. Additionally, it can be easily combined with other steering behaviors to create more complex and realistic behavior.

4. What are the limitations of Seek Steering Behavior?

One limitation of Seek Steering Behavior is that it only works for single-target movement and cannot handle multiple targets at once. It also does not account for dynamic changes in the environment, such as moving obstacles, which can lead to collisions. Additionally, it may not be suitable for all types of movement, such as precise or complex movements.

5. How is Seek Steering Behavior different from other steering behaviors?

Seek Steering Behavior is different from other steering behaviors in that it is focused on moving towards a specific target. Other steering behaviors, such as flee or evade, are focused on avoiding a target. Additionally, Seek Steering Behavior is a basic and fundamental behavior that serves as a building block for more complex behaviors, while other steering behaviors may be more specialized and situational.

Similar threads

  • Introductory Physics Homework Help
Replies
2
Views
2K
Replies
10
Views
2K
  • Introductory Physics Homework Help
Replies
1
Views
2K
Back
Top