IAtari
Genetic algorithm generating AI capable to play Atari2600 games.
message.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <boost/serialization/list.hpp>
3 
16 namespace message
17 {
18  template <typename T>
24  struct request
25  {
26  int id;
27  int nb_eval;
28  uint64_t seed;
29  T params;
30  template <typename Archive>
39  void serialize(Archive& ar, const unsigned int)
40  {
41  ar & id
42  & nb_eval
43  & seed
44  & params;
45  }
46  };
47 
53  template <typename T>
54  struct result
55  {
56  int id;
57  std::list<T> results;
58  template <typename Archive>
67  void serialize(Archive& ar, const unsigned int)
68  {
69  ar & id
70  & results;
71  }
72  };
73 }
void serialize(Archive &ar, const unsigned int)
Save/Load agent with archive.
Definition: message.hpp:39
int id
Definition: message.hpp:26
Handle different "serializable friendly" representations of an agent.
int id
Definition: message.hpp:56
Represent the score performed by a freshly tested agent, can be (un)serialized.
Definition: message.hpp:54
uint64_t seed
Definition: message.hpp:28
std::list< T > results
Definition: message.hpp:57
int nb_eval
Definition: message.hpp:27
void serialize(Archive &ar, const unsigned int)
Save/Load agent with archive.
Definition: message.hpp:67
Represent an agent to be tested, can be (un)serialized.
Definition: message.hpp:24
T params
Definition: message.hpp:29