AI: select immediate acceleration / rotation to reach the end point

I am working on a game where, with every update of the game cycle, AI is executed. During this update, I have a chance to turn an object controlled by AI and / or speed it up in the direction it is. I want it to reach its final location (within a reasonable range) and in this place have a certain speed and direction (again, this does not need to be exact) That is, given the current:

  • P 0 (x, y) = Current Position Vector
  • V 0 (x, y) = Vector of the current speed (units / second)
  • θ 0 = Current direction (radians)
  • τ max = Maximum rotation speed (radian / second)
  • α max = Maximum acceleration (units / second ^ 2)
  • | V | max = Absolute maximum speed (units / second)
  • P f (x, y) = target position vector
  • V f (x, y) = target velocity vector (units / second)
  • θ f = Target rotation (radian)

Choose Immediate:

  • τ = Rotational speed within [-τ max , τ max ]
  • α = Acceleration scalar within [0, α max ] (should be accelerated in the direction in which it is currently)

Thus, they are minimized:

  • t=
  • | P t -P f |=
  • | V t -V f |=
  • | θ tf |= ( (-π, π))

. 1000 , , , , ( - ):

Pic http://public.blu.livefilestore.com/y1p6zWlGWeATDQCM80G6gaDaX43BUik0DbFukbwE9I4rMk8axYpKwVS5-43rbwG9aZQmttJXd68NDAtYpYL6ugQXg/words.gif

α τ Δt (Δt → 0 ) / , ( , , , ):

http://public.blu.livefilestore.com/y1p6zWlGWeATDTF9DZsTdHiio4dAKGrvSzg904W9cOeaeLpAE3MJzGZFokcZ-ZY21d0RGQ7VTxHIS88uC8-iDAV7g/equations.gif

(EDIT: θ = θ 0 + τΔt)

, α τ (, , > 100 )? , , , - :

  • Δt, Δts (.. )
  • 5 (α, τ) = {0, α max} x {-τ max, 0, τ max} ( 6 5 , , , )
  • , . , (.. , ).
  • , Δt.

, , :

  • , ( )
  • .
  • , "".

, (, , ) , P f, V f θ f (.. / ), .

? , ?

,

+5
2

, PD. . , . - . Eh. ( ), , KpEh + d/dt EhKd. .

thats

- ", , ". , , .

, , , , PD . PID, . Matlab. , , , , " ", , . , " , ". , . , "", , , , , . , . , , . PD , , . Kd Kp , Matlab. ( )

, , , ;)

.

: ... , . , , google , .

+3

http://en.wikipedia.org/wiki/Bang%E2%80%93bang_control ( Bang-bang), PID PD. , , , , , , , , , . , - .

+2

All Articles