![]() |
IAtari
Genetic algorithm generating AI capable to play Atari2600 games.
|
Handle genetic operations performed on agents. More...
Functions | |
static agent::instruction | random_instruction (const agent &a) |
Generate a random instruction. More... | |
void | initialize (agent &a) |
Initialize an agent with random instructions. More... | |
void | mutate (agent &a) |
Mutate an agent, i.e. modify some instructions. More... | |
void | crossover (agent &a1, agent &a2) |
Swap instructions between two agents. More... | |
Handle genetic operations performed on agents.
Swap instructions between two agents.
[in,out] | a1 | The first agent involved in crossover |
[in,out] | a2 | The second agent involved in crossover |
void genetic_operators::initialize | ( | agent & | a | ) |
Initialize an agent with random instructions.
[in,out] | a | The agent to be initialized |
void genetic_operators::mutate | ( | agent & | a | ) |
Mutate an agent, i.e. modify some instructions.
[in,out] | a | The agent to be affected by mutation |
|
static |
Generate a random instruction.
[in] | a | Agent in which the instruction will be inserted |