This class describes a general ship. A ship has:
physical properties.
Any implementation of any of the above part can be plugged-in,
allowing to mix different combinations of capabilities into a ship.
A ship's external state, which is its coordinates, velocity,
orientation and so on, is not part of the ship itself, but part of the
environment, and is part of the world state.
|
__init__(self,
perceptionModule=CompleteStatePerceptionModule(),
initialEngineSpeed=0,
initialSteering=0,
maxSpeed=40,
minSpeed=-10,
maxSteering=90,
minSteering=-90,
mass=1000,
length=12) |
source code
|
|
|
|
|
getPercepts(self,
fullState)
We view the ship as receiving a full world state and then
"filtering" it to only the percepts it is able to process. |
source code
|
|
|
executeAction(self,
action)
Change the internal state of a ship as a result of an action that was
chosen by the ship agent. |
source code
|
|
|
|
|
|
|
|
|
getForwardForce(self,
shipSpeed)
Computing the forward force applied on the ship based on the engine
and the drag forces. |
source code
|
|
|
getSteeringForce(self,
shipSpeed,
shipAngularSpeed)
Computing the steering force based on the, the speed, the drag and so
on. |
source code
|
|
|
getForwardAccelerationFromForce(self,
forwardForce) |
source code
|
|
|
|
NumPy vector
|
|