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 
9 namespace message
10 {
11  template <typename T>
22  struct request
23  {
24  int id;
25  int nb_eval;
26  uint64_t seed;
27  T params;
28  template <typename Archive>
37  void serialize(Archive& ar, const unsigned int)
38  {
39  ar & id
40  & nb_eval
41  & seed
42  & params;
43  }
44  };
45 
46  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:37
int id
Definition: message.hpp:24
int id
Definition: message.hpp:56
Represent a serialized agent freshly tested.
Definition: message.hpp:54
uint64_t seed
Definition: message.hpp:26
std::list< T > results
Definition: message.hpp:57
int nb_eval
Definition: message.hpp:25
void serialize(Archive &ar, const unsigned int)
Save/Load agent with archive.
Definition: message.hpp:67
Represent a serialized agent extracted from an archive.
Definition: message.hpp:22
T params
Definition: message.hpp:27