ReferenceError: deepqlearn is not defined
- Dominant language
- JavaScript
- Stars
- 11.2k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Description
Followed your example and suddenly it cannot find `deepqlearn`. I'm doing this in Node.js.
```
var convnetjs = require('convnetjs');
// the normal examples with layer_defs etc. worked, but not this:
var brain = new deepqlearn.Brain(3, 2); // 3 inputs, 2 possible outputs (0,1)
var state = [Math.random(), Math.random(), Math.random()];
for(var k=0;k<10000;k++) {
var action = brain.forward(state); // returns index of chosen action
var reward = action === 0 ? 1.0 : 0.0;
brain.backward(reward); // <-- learning magic happens here
state[Math.floor(Math.random()*3)] += Math.random()*2-0.5;
}
brain.epsilon_test_time = 0.0; // don't make any more random choices
brain.learning = false;
// get an optimal action from the learned policy
var action = brain.forward(array_with_num_inputs_numbers);
```
Seems like it can't find deepqlearn. Saw under `node_modules/convnet/deepqlearn.js` there's an export statement; but your `package.json` specifies `convnet.js` as the `main`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.