Interface

Agent base class allowing communication with Assetto Corsa

Assetto Corsa Interface

ABSTRACT CLASS

aci.AssettoCorsaInterface

(

config: Dict

)

Provides an interface for autonomous agents to Assetto Corsa. Agents should inherit from this class and implement the setup(), teardown() and behavior() methods

Arguments:

  • config (Dict) - Configuration dictionary see the Simulation and Interface configuration pages for more information

ABSTRACT METHOD

behavior(

observation: Dict

)

Implement the agent's response to observations here. Returned np.array is the agent's action in the format [steering angle, throttle, brake]. Steering angles are between -1.0 left-lock and 1.0 right-lock. Both throttle and brake are between 0.0 and 1.0 where 0.0 is no input and 1.0 is maximum input

Arguments:

  • observation (Dict) - Dictionary containing most recent state gathered from the simulation. For more information refer to the Observation documentation

Returns:

np.array

METHOD

run( )

Starts simulation with the specified configurations and evaluates the agent

Returns:

None

ABSTRACT METHOD

teardown( )

Implement any clean up actions to run on agent termination or crash here

Returns:

None

ABSTRACT METHOD

setup( )

Implement any set up actions to run

Returns:

None