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 
10 namespace message
11 {
12  template <typename T>
18  struct request
19  {
20  int id;
21  int nb_eval;
22  uint64_t seed;
23  T params;
24  template <typename Archive>
33  void serialize(Archive& ar, const unsigned int)
34  {
35  ar & id
36  & nb_eval
37  & seed
38  & params;
39  }
40  };
41 
42  template <typename T>
48  struct result
49  {
50  int id;
51  std::list<T> results;
52  template <typename Archive>
61  void serialize(Archive& ar, const unsigned int)
62  {
63  ar & id
64  & results;
65  }
66  };
67 }
void serialize(Archive &ar, const unsigned int)
Save/Load agent with archive.
Definition: message.hpp:33
int id
Definition: message.hpp:20
int id
Definition: message.hpp:50
Represent a serialized agent freshly tested.
Definition: message.hpp:48
uint64_t seed
Definition: message.hpp:22
std::list< T > results
Definition: message.hpp:51
int nb_eval
Definition: message.hpp:21
void serialize(Archive &ar, const unsigned int)
Save/Load agent with archive.
Definition: message.hpp:61
Represent a serialized agent extracted from an archive.
Definition: message.hpp:18
T params
Definition: message.hpp:23