Skip to content
OwlScream edited this page Oct 9, 2014 · 12 revisions

Finite State Machine Driver (FSMDriver)

  1. Objective

This repository aims for the development of an artificial intelligence (henceforth called simply AI) to be implemented in a driver inside the TORCS (The Open Racing Car Simulator) environment.

  1. Introduction

2.1. The TORCS environment

TORCS[1] is a platform focused on the establishment of ground rules towards the comparison of algorithms concerning programming and AI. The purpose is to create pilots to simulate real-life situations of racing competitions, and to do so, the Formula 1 score/awarding system is used as unbiased criteria.
The interface provides with a diversified set of sensors, such as the current position of the car in the track, its acceleration and brake values, and so on. Utilizing this sensor is the method with which the users communicate with their created pilots and the environment, and it is of their responsibility to program the entire behavior of this pilot, in whichever programming language of desire.
TORCS started some years ago to have its own competitions, where groups of development can submit their pilots in order to compete with others, and the goal of FSMDriver is to be submitted to one of such competitions.

2.2. The FSMDriver

The method of choice to submit the pilot to future TORCS competitions is, naturally, a finite state machine. A brief explanation of the behavior of this method will be given in this wiki, for more information, finite state machines are widespread over the academic knowledge in books and in the web.
Finite State Machines (FSM), Finite-State Automaton, or even the simple State Machine, are designations of the same model. They all describe a mathematical model of computation used in computer programs, such as this one, and also in sequential logic circuits. FSM has a typical abstract machine behavior, with a limited number of states, and, by definition, can be only and exclusively in one of these states at a time. The state in which the machine is in a present/defined moment will be hereby called the current state, as a matter of convenience. The machine changes its current state when triggered by a pre-defined event, also hereby called a transition.
Thus, to sum up, a FSM is a model of defined by states, which the current state is changed every time a transition defined by the designated conditions is triggered.
@todo FSMDriver States' explanations

[...] @todo body of wiki

  1. Desing Patterns

3.1. Structural Design Patterns

This sections defines the format in which the variables, constants, methods and other parameters of the codes should be created and referred to.

3.1.1. Variables and Methods/Functions

Variables and Methods/Functions will start with lower case letters and from the second word and on, capital letters, as follows:

type_T nameOfVariable; type_T nameOfMethod(type_T nameOfParameter1, type_T nameOfParameter2)

[to be continued...]

Clone this wiki locally