Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added if learning condition for writing weights
  • Loading branch information
sos13004 committed Apr 29, 2017
1 parent f511ac8 commit 66ceb7b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Learn.java
Expand Up @@ -120,7 +120,7 @@ public class Learn{
if(learning && !switchedToEndGame){
le.addData(current.getFeatures(alpha.getPlayer()), next.getValue()); // add this moves data to the data set (the value of the state is stored in the move. there is probably a better way to do this)
}
else if(switchedToEndGame){
else if(learning && switchedToEndGame){
endle.addData(current.getEndGameFeatures(alpha.getPlayer()), next.getValue());
}
current = current.result(next); // make the move
Expand Down
8 changes: 8 additions & 0 deletions src/weights/alpha.csv
Expand Up @@ -238,3 +238,11 @@
3009.069370626828, -24.285677007924463, 24.688977766025346, 176.62705146719483, 6.447126303312221, 2.783552147365609, 28.749676932008803, -235.2302515085287, -203.36431054211803, 4.213613222647522, -20.234164528178965, -33.25310964667955
2951.067530543304, -159.07099066266204, 16.837221893320123, 158.6878560788984, 52.132792011639026, 1.1745039423919537, 22.11531839161577, -213.2550912106616, -206.78247181020814, -20.40688911191529, -0.3805666720408354, -45.33789581556924
2866.8868904237856, -142.13229030893228, 11.545188736211793, 158.22309853916653, 50.9989591432032, -1.4138683076089993, 42.09622930223864, -180.73092999185428, -197.7998025583713, -12.609385626558296, -7.192390557638213, -44.40457584552302
2469.1069310700377, -128.30217118825016, 7.297754451378214, 300.62401614913097, 50.99794865325867, -0.47202599362094655, 48.567859101687425, -326.2048621089701, -339.2340321129344, -10.852602664851549, -6.046665375572767, -39.86759892582617
2478.9211021943725, -117.65992283947918, 4.6567129408501415, 284.6729388631838, 48.732017973280335, 2.2006021708693027, 52.552659666340624, -328.0118921488003, -337.1808016680877, -6.284540163595371, -5.690137990124917, -34.75622977137869
2533.5998117618274, -112.37700641501915, -1.1358471274344408, 273.3798127091255, 50.03584252282105, 0.6136723255151826, 61.39389931485697, -301.91521662318075, -318.4815145365355, -2.426062887806053, -3.1608021287903347, -39.586428218412685
2597.8961549411674, -100.62939481520661, -2.848393814353134, 281.39980851182617, 38.65483641438807, -5.61658259207549, 55.63244861706939, -268.80553278990476, -290.4614588396687, 8.108847118287787, -2.642225682517369, -43.47335526702015
2762.7689902784173, -95.8830154000666, -3.9074753205318653, 260.7371663359123, 40.7513330890985, -9.207851516363494, 36.901485522947794, -224.60467264480252, -253.85364164821834, 17.943009221067516, -22.136357073175365, -45.782007872790274
2748.259854503185, -87.48980082358004, -5.288724513701669, 265.58830325734243, 36.28172723511446, -7.791880564924852, 40.150740692467984, -233.1438055917849, -253.68427225743415, 13.295284506797067, -26.400340689204327, -45.517118368021166
2893.2091538169257, -72.53845698292515, -6.921830421732004, 245.158582584236, 29.454458575642043, -9.154570165006666, 32.12961059466679, -205.79468535372817, -228.06315620365052, 7.425465096651465, -16.391055127082375, -45.05623892756767
2918.0548563040734, -64.85837682738068, 7.329578248389094, 227.92940585973724, 24.555634519802542, -15.005356116168926, 34.33419570077508, -148.2176335845995, -179.29650915388106, 12.745505392890541, -20.75139237707225, -49.81813929901674
7 changes: 7 additions & 0 deletions src/weights/endalpha.csv
Expand Up @@ -38,3 +38,10 @@
34.29346261669157, 0.2951876167857882, 0.8181508834781575, -0.29541606264372866
33.584381554011266, 0.42623870908829853, 0.8037138081798451, 0.004191978488671644
34.30151414858097, 0.39430957833943214, 0.7561481295223783, -0.005064739062742088
32.885542123254524, 0.09377673261455355, 0.6852122343926211, -0.010206524010965178
32.97318617840965, 0.060763305218234184, 0.7635320281677977, -0.1231134005608787
33.18620564688959, 0.05291393599605532, 0.6408532551190026, -0.0739443947130067
33.661956641945565, 0.011479355418823736, 0.5730140461747836, -0.09513307580046654
33.95476851510729, 0.04063500827559182, 0.5033108807382902, -0.0858811439962612
34.42343662265204, -0.03037887038898198, 0.4416629521317248, -0.11397847897913543
34.53240786046536, -0.041016412692443105, 0.38034289748437955, -0.11141064228959092

0 comments on commit 66ceb7b

Please sign in to comment.