IAtari
Genetic algorithm generating AI capable to play Atari2600 games.
fitness.hpp File Reference

Handle score computing and flow control. More...

#include "message.hpp"
#include "master.hpp"
#include <boost/asio/spawn.hpp>
#include <boost/interprocess/sync/interprocess_semaphore.hpp>
#include <vector>
#include <memory>
#include <functional>
#include <atomic>
#include <thread>
#include <numeric>

Go to the source code of this file.

Classes

class  genetic_algorithms::distributed_fitness< Res, Params >
 Handle flow control of the algorithm. More...
 

Namespaces

 genetic_algorithms
 Handle score computing and flow control of the algorithm.
 
 genetic_algorithms::accumulate
 Handle computation of score.
 

Functions

template<typename Res , typename Params >
std::shared_ptr< distributed_fitness< Res, Params > > genetic_algorithms::make_distributed_fitness (int port, std::function< Res(const std::list< Res > &)> accumulate, int nb_eval_by_parameter=1, int nb_eval_by_slave=1)
 Creates a fitness tool and launches a master in a separate thread. More...
 
double genetic_algorithms::accumulate::mean_score (const std::list< T > &l)
 Compute the mean of a list of values. More...
 

Detailed Description

Handle score computing and flow control.