This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph plan_v1 { | |
// rankdir=LR // uncommenting this line may help converting the dot to png but the png may not look nice. | |
// comment all the `rank=same` in this file will help converting the dot to png. | |
compound=true | |
subgraph cluster28 { | |
color=black // not query | |
shape=box | |
penwidth=3 | |
label="id: 28\ndag id: 0\ncardinality: 100" | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "statistic_monitor.hpp" | |
#include "cassert" | |
#include "caf/all.hpp" | |
#include "caf/io/all.hpp" | |
using namespace caf; | |
using namespace chrono; | |
using namespace literals; | |
string self_host; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <thread> | |
#include <chrono> | |
#include <functional> | |
#include <iostream> | |
template<typename I> | |
class StatisticMonitor { | |
public: | |
typedef std::function<I()> Watcher; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "caf/all.hpp" | |
#include "caf/io/middleman.hpp" | |
using namespace caf; | |
class Master : public caf::event_based_actor { | |
public: | |
caf::actor inner; | |
Master(caf::actor_config &cfg, caf::actor inner) : event_based_actor(cfg) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include "caf/all.hpp" | |
//template<typename Inspect, typename T> | |
//typename Inspect::type_name inspect(Inspect &ins, std::vector<T> &vec) { | |
// return ins(caf::meta::type_name("vector"), vec); | |
//}; | |
#include "caf/io/all.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DQN(DQNBase): | |
def __init__(self): | |
self.k = HP['frame_skipping'] | |
def initialState(self): | |
states = [] | |
obs = self.env.reset() | |
obs = self.model.preprocess(obs) | |
for _ in range(HP['stacked_frame_size']): | |
states.append(obs) |