Add config

This commit is contained in:
Anton Vakhrushev 2018-06-07 11:29:22 +03:00
parent 4c4134b908
commit b84cf6251d

View File

@ -7,10 +7,17 @@ export default class Predictor {
journal;
supervisor;
constructor() {
constructor(config) {
this.score = 0;
this.journal = new Journal();
this.supervisor = new Supervisor([new Daemon(3, 3)]);
const daemons = config.daemons.map(daemonConfig => {
return new Daemon(
daemonConfig.human,
daemonConfig.robot,
daemonConfig.epsilon || 0.01
);
});
this.supervisor = new Supervisor(daemons, config.epsilon || 0.01);
}
pass(value) {