{"action":"created","issue":{"url":"https://api.github.com/repos/karpathy/convnetjs/issues/48","labels_url":"https://api.github.com/repos/karpathy/convnetjs/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/karpathy/convnetjs/issues/48/comments","events_url":"https://api.github.com/repos/karpathy/convnetjs/issues/48/events","html_url":"https://github.com/karpathy/convnetjs/issues/48","id":103720014,"number":48,"title":"ReferenceError: deepqlearn is not defined","user":{"login":"kengz","id":8209263,"avatar_url":"https://avatars.githubusercontent.com/u/8209263?v=3","gravatar_id":"","url":"https://api.github.com/users/kengz","html_url":"https://github.com/kengz","followers_url":"https://api.github.com/users/kengz/followers","following_url":"https://api.github.com/users/kengz/following{/other_user}","gists_url":"https://api.github.com/users/kengz/gists{/gist_id}","starred_url":"https://api.github.com/users/kengz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kengz/subscriptions","organizations_url":"https://api.github.com/users/kengz/orgs","repos_url":"https://api.github.com/users/kengz/repos","events_url":"https://api.github.com/users/kengz/events{/privacy}","received_events_url":"https://api.github.com/users/kengz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-28T13:35:13Z","updated_at":"2015-11-02T16:03:11Z","closed_at":null,"body":"Followed your example and suddenly it cannot find `deepqlearn`. I'm doing this in Node.js.\r\n```\r\nvar convnetjs = require('convnetjs');\r\n// the normal examples with layer_defs etc. worked, but not this:\r\nvar brain = new deepqlearn.Brain(3, 2); // 3 inputs, 2 possible outputs (0,1)\r\nvar state = [Math.random(), Math.random(), Math.random()];\r\nfor(var k=0;k<10000;k++) {\r\n    var action = brain.forward(state); // returns index of chosen action\r\n    var reward = action === 0 ? 1.0 : 0.0;\r\n    brain.backward(reward); // <-- learning magic happens here\r\n    state[Math.floor(Math.random()*3)] += Math.random()*2-0.5;\r\n}\r\nbrain.epsilon_test_time = 0.0; // don't make any more random choices\r\nbrain.learning = false;\r\n// get an optimal action from the learned policy\r\nvar action = brain.forward(array_with_num_inputs_numbers);\r\n```\r\n\r\nSeems 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`."},"comment":{"url":"https://api.github.com/repos/karpathy/convnetjs/issues/comments/153062766","html_url":"https://github.com/karpathy/convnetjs/issues/48#issuecomment-153062766","issue_url":"https://api.github.com/repos/karpathy/convnetjs/issues/48","id":153062766,"user":{"login":"kengz","id":8209263,"avatar_url":"https://avatars.githubusercontent.com/u/8209263?v=3","gravatar_id":"","url":"https://api.github.com/users/kengz","html_url":"https://github.com/kengz","followers_url":"https://api.github.com/users/kengz/followers","following_url":"https://api.github.com/users/kengz/following{/other_user}","gists_url":"https://api.github.com/users/kengz/gists{/gist_id}","starred_url":"https://api.github.com/users/kengz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kengz/subscriptions","organizations_url":"https://api.github.com/users/kengz/orgs","repos_url":"https://api.github.com/users/kengz/repos","events_url":"https://api.github.com/users/kengz/events{/privacy}","received_events_url":"https://api.github.com/users/kengz/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T16:03:11Z","updated_at":"2015-11-02T16:03:11Z","body":"@SimplyY If by that you mean if it can run like an efficient program on Java/C++, then yes. Nodejs is a complete and performant language like Python. I just wanted to get rid of the browser dependency here and use convnet like a programming library."}}