IAtari
Genetic algorithm generating AI capable to play Atari2600 games.
master< Res, Params >::session Struct Reference

Coroutine managing ONE slave. More...

Inheritance diagram for master< Res, Params >::session:

Public Member Functions

void run (master< Res, Params > &master, connection_ptr connection)
 Automatically launches test on agents when master is ready. More...
 
void close (master< Res, Params > &master, connection_ptr connection)
 Remove a slave from the list of available slaves and close his connection. More...
 

Detailed Description

template<typename Res, typename Params>
struct master< Res, Params >::session

Coroutine managing ONE slave.

Member Function Documentation

◆ close()

template<typename Res , typename Params >
void master< Res, Params >::session::close ( master< Res, Params > &  master,
connection_ptr  connection 
)

Remove a slave from the list of available slaves and close his connection.

Parameters
[in]masterThe master corresponding to this slave
connectionThe slave to be removed

◆ run()

template<typename Res , typename Params >
void master< Res, Params >::session::run ( master< Res, Params > &  master,
connection_ptr  connection 
)

Automatically launches test on agents when master is ready.

The coroutine waits for the master to fill the work queue.
Then, an agent is extracted and sent to the slave.
When the slave responds, the result is put in the list of results and the coroutine loops.
If an error occured during the agent testing, the agent is replace in the work queue.

Parameters
masterThe master corresponding to this slave
connectionThe slave used to performed tests

The documentation for this struct was generated from the following file: