mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
Initial release of neural net based dole divider
This commit is contained in:
1 parent
56cf131c70
commit
94d434c8ef
3 files changed
+130
-29
No files matched your search
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
function sigmoid0(x)
|
||||
{
|
||||
return x/(1+abs(x));
|
||||
return x/(1+Math.abs(x));
|
||||
}
|
||||
function sigmoid1(x)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ outputs[2]=sigmoid0(outputs[2]);
|
||||
|
||||
if (outputs[0]<0) outputs[0]=0;
|
||||
outputs[0]=outputs[0]*numreq;
|
||||
var res1=trunc(outputs[0]);
|
||||
var res1=Math.trunc(outputs[0]);
|
||||
if (res1>numreq) res1=numreq;
|
||||
if (res1>instore) res1=instore;
|
||||
if (res1<0) res1=0;
|
||||
|
||||
Reference in new issue
Block a user