Add config
This commit is contained in:
parent
4c4134b908
commit
b84cf6251d
@ -7,10 +7,17 @@ export default class Predictor {
|
|||||||
journal;
|
journal;
|
||||||
supervisor;
|
supervisor;
|
||||||
|
|
||||||
constructor() {
|
constructor(config) {
|
||||||
this.score = 0;
|
this.score = 0;
|
||||||
this.journal = new Journal();
|
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) {
|
pass(value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user