Configuration

The player configuration is used to add agents to the race. Each agent can be an AI or player controlled, and produces a separate render_data output.

class pystk.PlayerConfig

SuperTuxKart player configuration

class Controller
AI_CONTROL = 1
PLAYER_CONTROL = 0
property name str
property value int
property controller pystk.PlayerConfig.Controller

Let the player (PLAYER_CONTROL) or AI (AI_CONTROL) drive. The AI ignores actions in step(action).

property kart str

Kart type, see list_karts for a list of kart types

property team int

Team of the player 0 or 1

The main race configuration specified everything from the track to use, the race type, number of agents and additional AI agents.

class pystk.RaceConfig

SuperTuxKart race configuration.

class RaceMode
CAPTURE_THE_FLAG = 5
FOLLOW_LEADER = 2
FREE_FOR_ALL = 4
NORMAL_RACE = 0
SOCCER = 6
THREE_STRIKES = 3
TIME_TRIAL = 1
property name str
property value int
property difficulty int

Skill of AI players 0..2

property laps int

Number of laps the race runs for

property mode pystk.RaceConfig.RaceMode

Specify the type of race

property num_kart int

Total number of karts, fill the race with num_kart - len(players) AI karts

property players pystk.VectorPlayerConfig

List of all agent players

property reverse bool

Reverse the track

property seed int

Random seed

property step_size float

Game time between different step calls

property track str

Track name

pystk.list_tracks() List[str]

Return a list of track names (possible values for RaceConfig.track)

pystk.list_karts() List[str]

Return a list of karts to play as (possible values for PlayerConfig.kart