TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
episodeserver.h
1 /*
2  * Copyright (c) 2017-present, Facebook, Inc.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #pragma once
9 
10 #include "trainer.h"
11 #include "zmqbufferedconsumer.h"
12 #include "zmqbufferedproducer.h"
13 
14 #include <cereal/archives/binary.hpp>
15 
16 namespace zmq {
17 class context_t;
18 class socket_t;
19 } // namespace zmq
20 
21 namespace cpid {
22 
23 struct EpisodeData {
26 
27  EpisodeData() = default;
29  : key(std::move(key)), episode(std::move(episode)) {}
31  : key(std::move(key)), episode(std::move(episode)) {}
32 
33  template <typename Archive>
34  void serialize(Archive& ar) {
35  ar(key.gameID);
36  ar(key.episodeKey);
37  ar(episode);
38  }
39 };
40 
43 
44 } // namespace cpid
Definition: episodeserver.h:23
EpisodeTuple key
Definition: episodeserver.h:24
STL namespace.
EpisodeKey episodeKey
Definition: trainer.h:54
void serialize(Archive &ar)
Definition: episodeserver.h:34
A buffered producer that obtains data via ZeroMQ.
Definition: zmqbufferedproducer.h:51
EpisodeData(EpisodeTuple key, ReplayBuffer::Episode &&episode)
Definition: episodeserver.h:30
ReplayBuffer::Episode episode
Definition: episodeserver.h:25
A buffered consumer that sends data via ZeroMQ.
Definition: zmqbufferedconsumer.h:42
The TorchCraftAI training library.
Definition: batcher.cpp:15
Definition: trainer.h:52
GameUID gameID
Definition: trainer.h:53
std::vector< std::shared_ptr< ReplayBufferFrame >> Episode
Definition: trainer.h:89
Definition: episodeserver.h:16
EpisodeData(EpisodeTuple key, ReplayBuffer::Episode episode)
Definition: episodeserver.h:28