TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
microscenarioprovidersnapshot.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 "common/datareader.h"
11 #include "microscenarioprovider.h"
12 #include "snapshotter.h"
13 
14 namespace cherrypi {
15 
16 /**
17  * Provides scenarios constructed from Snapshots of real games.
18  */
20  public:
21  /// Specifies the directory where snapshots are located.
23 
24  /// Specifies a file lists snapshots relative to the SnapshotDirectory.
25  MicroScenarioProviderSnapshot& setIndexFile(const std::string&);
26 
27  /// Samples a Scenario from the list specified in setIndexFile.
29 
30  protected:
31  void invalidate_();
33  std::string snapshotDirectory_;
34  std::string indexFile_;
35  std::unique_ptr<common::DataReader<Snapshot>> dataReader_;
36  std::unique_ptr<common::DataReaderIterator<Snapshot>> dataIterator_;
37 };
38 
39 } // namespace cherrypi
std::string indexFile_
Definition: microscenarioprovidersnapshot.h:34
void invalidate_()
Definition: microscenarioprovidersnapshot.cpp:28
Snapshot loadSnapshot_()
Definition: microscenarioprovidersnapshot.cpp:33
MicroScenarioProviderSnapshot & setSnapshotDirectory(const std::string &)
Specifies the directory where snapshots are located.
Definition: microscenarioprovidersnapshot.cpp:14
std::unique_ptr< common::DataReaderIterator< Snapshot > > dataIterator_
Definition: microscenarioprovidersnapshot.h:36
A low-resolution snapshot of a game state, intended for producing micro training scenarios.
Definition: snapshotter.h:64
MicroScenarioProviderSnapshot & setIndexFile(const std::string &)
Specifies a file lists snapshots relative to the SnapshotDirectory.
Definition: microscenarioprovidersnapshot.cpp:21
Definition: microscenarioprovider.h:18
Provides scenarios constructed from Snapshots of real games.
Definition: microscenarioprovidersnapshot.h:19
Definition: scenariospecification.h:57
FixedScenario getFixedScenario() override
Samples a Scenario from the list specified in setIndexFile.
Definition: microscenarioprovidersnapshot.cpp:51
Main namespace for bot-related code.
Definition: areainfo.cpp:17
std::string snapshotDirectory_
Definition: microscenarioprovidersnapshot.h:33
std::unique_ptr< common::DataReader< Snapshot > > dataReader_
Definition: microscenarioprovidersnapshot.h:35