#include <InputDeviceAI.h>
Inheritance diagram for Engine::InputDeviceAI:
Public Member Functions | |
InputDeviceAI () | |
A input device for a computer player. | |
virtual | ~InputDeviceAI () |
virtual int | get_acceleration () |
Get a number representing the acceleration or breaking. | |
virtual int | get_slide () |
Sideways force . | |
virtual int | get_steering () |
Stearing angle. | |
virtual void | poll () |
Poll for events, if necessary. | |
void | save () |
Write the neural network to a file. | |
void | mutate () |
Add some random variance to the neural network. | |
void | cross (const InputDeviceAI &p1, const InputDeviceAI &p2) |
Set neural network weights that combine those of another two InputDeviceAIs. | |
Private Attributes | |
int | acceleration |
int | slide |
int | steering |
fann * | ann |
Simulated events occur when an AI decides.
Definition at line 23 of file InputDeviceAI.h.
Engine::InputDeviceAI::InputDeviceAI | ( | ) |
A input device for a computer player.
Simulated events occur when an AI decides.
Definition at line 22 of file InputDeviceAI.cpp.
Engine::InputDeviceAI::~InputDeviceAI | ( | ) | [virtual] |
Definition at line 32 of file InputDeviceAI.cpp.
void Engine::InputDeviceAI::cross | ( | const InputDeviceAI & | p1, | |
const InputDeviceAI & | p2 | |||
) |
Set neural network weights that combine those of another two InputDeviceAIs.
Definition at line 273 of file InputDeviceAI.cpp.
int Engine::InputDeviceAI::get_acceleration | ( | ) | [virtual] |
Get a number representing the acceleration or breaking.
Implements Engine::InputDevice.
Definition at line 37 of file InputDeviceAI.cpp.
int Engine::InputDeviceAI::get_slide | ( | ) | [virtual] |
Sideways force .
Implements Engine::InputDevice.
Definition at line 42 of file InputDeviceAI.cpp.
int Engine::InputDeviceAI::get_steering | ( | ) | [virtual] |
Stearing angle.
Implements Engine::InputDevice.
Definition at line 47 of file InputDeviceAI.cpp.
void Engine::InputDeviceAI::mutate | ( | ) |
void Engine::InputDeviceAI::poll | ( | ) | [virtual] |
Poll for events, if necessary.
Reimplemented from Engine::InputDevice.
Definition at line 52 of file InputDeviceAI.cpp.
void Engine::InputDeviceAI::save | ( | ) |
int Engine::InputDeviceAI::acceleration [private] |
Definition at line 39 of file InputDeviceAI.h.
fann* Engine::InputDeviceAI::ann [private] |
Definition at line 40 of file InputDeviceAI.h.
int Engine::InputDeviceAI::slide [private] |
Definition at line 39 of file InputDeviceAI.h.
int Engine::InputDeviceAI::steering [private] |
Definition at line 39 of file InputDeviceAI.h.
Generated at Mon Sep 6 00:41:17 2010 by Doxygen version 1.4.7 for Racer version svn335.