This is a copy of the reimplementation in Python 3 by @moltob of the original SCRC TORCS client pySrcrcClient from @lanquarden. It is used to teach ideas of computational intelligence. The file my_driver.py
contains a shell to start writing your own driver.
- top level class
- handles all aspects of networking (connection management, encoding)
- decodes class
State
from message from server,state = self.decode(msg)
- encodes class
Command
for message to server,msg = self.encode(command)
- internal state connection properties only and driver instance
- use
Client(driver=your_driver, <other options>)
to use your own driver
- encapsulates driving logic only
- main entry point:
drive(state: State) -> Command
- represents the incoming car state
- holds the outgoing driving command