Maximum Acyclic Subgraph - Multiple Sequence Alignment
MaximumAcyclicSubgraph
RandomPolicy.h
1 #ifndef RANDOM_POLICY_H
2 #define RANDOM_POLICY_H
3 
4 #include "../pytorch/Policy.h"
5 #include "../../alignment/State.h"
6 #include <stdlib.h>
7 #include <random>
8 #include <chrono>
9 #include <utility>
10 
13 class RandomPolicy : public Policy {
14  public:
15 
16  RandomPolicy(){};
17  ~RandomPolicy(){};
18 
23  /*virtual std::vector <float> runPolicy(state* s) const override {
24  unsigned int n = s->edges.size();
25  std::vector <float> probAct(n, 0);
26  int cTemp = std::count(s->selectable.begin(), s->selectable.end(), true);
27  float counter = (float) cTemp;
28  for (unsigned int i = 0; i < n; i++) {
29  if (s->selectable[i] == true)
30  probAct[i] = (float)(1/counter);
31  }
32  return probAct;
33  }*/
34 };
35 #endif
This RandomPolicy promotes random selection of edges.
Definition: RandomPolicy.h:13