aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/machina/Evolver.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-15 21:53:48 +0000
committerDavid Robillard <d@drobilla.net>2013-01-15 21:53:48 +0000
commit69c8cde985cc012b6cae2a49d489553c5be67202 (patch)
tree08411dfc9fcf48660c7467d9140f3c35b16464ee /src/engine/machina/Evolver.hpp
parent987eaa018039cb891ffeca60b413a00b1f7da299 (diff)
downloadmachina-69c8cde985cc012b6cae2a49d489553c5be67202.tar.gz
machina-69c8cde985cc012b6cae2a49d489553c5be67202.tar.bz2
machina-69c8cde985cc012b6cae2a49d489553c5be67202.zip
Compile against latest Eugene (evolution still doesn't work, though).
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@4994 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/machina/Evolver.hpp')
-rw-r--r--src/engine/machina/Evolver.hpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/engine/machina/Evolver.hpp b/src/engine/machina/Evolver.hpp
index 17fae05..e14fc4a 100644
--- a/src/engine/machina/Evolver.hpp
+++ b/src/engine/machina/Evolver.hpp
@@ -17,41 +17,41 @@
#ifndef MACHINA_EVOLVER_HPP
#define MACHINA_EVOLVER_HPP
-#include "eugene/GAImpl.hpp"
+#include "eugene/GA.hpp"
+#include "eugene/Random.hpp"
#include "machina/types.hpp"
#include "raul/Thread.hpp"
#include "raul/TimeStamp.hpp"
+#include "Machine.hpp"
#include "Schrodinbit.hpp"
-namespace Eugene {
-template<typename G>
-class HybridMutation;
+namespace eugene {
+template<typename G> class HybridMutation;
}
namespace machina {
-class Machine;
class Problem;
-class Evolver
- : public Raul::Thread
+class Evolver : public Raul::Thread
{
public:
- Evolver(Raul::TimeUnit unit,
- const string& target_midi,
- SPtr<Machine> seed);
+ Evolver(Raul::TimeUnit unit,
+ const std::string& target_midi,
+ SPtr<Machine> seed);
void seed(SPtr<Machine> parent);
bool improvement() { return _improvement; }
- SPtr<const Machine> best() { return _ga->best(); }
+ const Machine& best() { return _ga->best(); }
- typedef Eugene::GAImpl<Machine> MachinaGA;
+ typedef eugene::GA<Machine> MachinaGA;
private:
void _run();
+ eugene::Random _rng;
SPtr<MachinaGA> _ga;
SPtr<Problem> _problem;
float _seed_fitness;