From c7e2e2895e73faa812c82bebd8dfead848fcaa1d Mon Sep 17 00:00:00 2001 From: Tyler Seip Date: Wed, 22 May 2024 21:14:49 -0400 Subject: [PATCH] Fix row-major order bug in vectorized evaluator --- docs/latex/classAbstractSearch.pdf | Bin 6695 -> 6695 bytes docs/latex/classBFSNode.pdf | Bin 6095 -> 6095 bytes docs/latex/classNInARow_1_1Heuristic.pdf | Bin 6454 -> 6448 bytes ...classNInARow_1_1NInARowBestFirstSearch.pdf | Bin 6596 -> 6596 bytes docs/latex/classNode.pdf | Bin 6090 -> 6090 bytes docs/latex/classSearch.pdf | Bin 5759 -> 5759 bytes ...ing_1_1board__explorer_1_1BoardDisplay.pdf | Bin 6377 -> 6375 bytes ...ting_1_1board__explorer_1_1FeatureList.pdf | Bin 6277 -> 6277 bytes ..._1_1board__explorer_1_1FeatureListItem.pdf | Bin 6322 -> 6322 bytes ...board__explorer_1_1HeuristicParameters.pdf | Bin 6653 -> 6653 bytes ...__explorer_1_1HeuristicViewToggleRadio.pdf | Bin 6692 -> 6698 bytes ...board__explorer_1_1LoadPositionsWidget.pdf | Bin 6176 -> 6176 bytes ...tting_1_1board__explorer_1_1MainWindow.pdf | Bin 6109 -> 6109 bytes ...ting_1_1board__explorer_1_1MoveHistory.pdf | Bin 6415 -> 6415 bytes ...board__explorer_1_1MoveHistoryListItem.pdf | Bin 6554 -> 6554 bytes ...fitting_1_1board__explorer_1_1MoveList.pdf | Bin 6285 -> 6285 bytes ...ing_1_1board__explorer_1_1MoveListItem.pdf | Bin 6337 -> 6337 bytes ...fitting_1_1board__explorer_1_1TreeView.pdf | Bin 6269 -> 6269 bytes ...1_1examples_1_1ModifiedBestFirstSearch.pdf | Bin 7522 -> 7522 bytes ...itting_1_1fourbynine_1_1AbstractSearch.pdf | Bin 7518 -> 7518 bytes ...fitting_1_1fourbynine_1_1BFSNodeVector.pdf | Bin 6177 -> 6177 bytes ...tting_1_1fourbynine_1_1BestFirstSearch.pdf | Bin 7520 -> 7520 bytes ...__fitting_1_1fourbynine_1_1BoardVector.pdf | Bin 5969 -> 5969 bytes ..._fitting_1_1fourbynine_1_1DoubleVector.pdf | Bin 5757 -> 5757 bytes ...ng_1_1fourbynine_1_1FeatureGroupWeight.pdf | Bin 6353 -> 6353 bytes ...fourbynine_1_1FeatureGroupWeightVector.pdf | Bin 6426 -> 6426 bytes ...ourbynine_1_1FeatureWithMetadataVector.pdf | Bin 6274 -> 6274 bytes ...l__fitting_1_1fourbynine_1_1MoveVector.pdf | Bin 5851 -> 5851 bytes ..._1fourbynine_1_1NInARowBestFirstSearch.pdf | Bin 7516 -> 7516 bytes ...l__fitting_1_1fourbynine_1_1NodeVector.pdf | Bin 5756 -> 5756 bytes ...__fitting_1_1fourbynine_1_1SizeTVector.pdf | Bin 5966 -> 5966 bytes ...ing_1_1fourbynine_1_1SizeTVectorVector.pdf | Bin 5950 -> 5950 bytes ...itting_1_1fourbynine_1_1SwigPyIterator.pdf | Bin 6215 -> 6215 bytes ..._1_1fourbynine_1_1__SwigNonDynamicMeta.pdf | Bin 6375 -> 6375 bytes ...1_1fourbynine_1_1fourbynine__bfs__node.pdf | Bin 5938 -> 5938 bytes ...ing_1_1fourbynine_1_1fourbynine__board.pdf | Bin 5725 -> 5725 bytes ...nine_1_1fourbynine__feature__evaluator.pdf | Bin 5827 -> 5827 bytes ...bynine_1_1fourbynine__game__tree__node.pdf | Bin 5936 -> 5936 bytes ...1_1fourbynine_1_1fourbynine__heuristic.pdf | Bin 5816 -> 5816 bytes ...nine_1_1fourbynine__heuristic__feature.pdf | Bin 5970 -> 5970 bytes ...ne__heuristic__feature__with__metadata.pdf | Bin 6132 -> 6132 bytes ...ting_1_1fourbynine_1_1fourbynine__move.pdf | Bin 5659 -> 5659 bytes ...g_1_1fourbynine_1_1fourbynine__pattern.pdf | Bin 5838 -> 5838 bytes ...ctorized__feature__evaluator_8h_source.tex | 137 ++++++++-------- docs/ninarow__heuristic_8h_source.html | 8 +- ...torized__feature__evaluator_8h_source.html | 149 +++++++++--------- ninarow_vectorized_feature_evaluator.h | 27 ++-- 47 files changed, 162 insertions(+), 159 deletions(-) diff --git a/docs/latex/classAbstractSearch.pdf b/docs/latex/classAbstractSearch.pdf index 2c2e405c45e76e143c480fde782efc8163bac2c5..66d1c3cd64060a5d7e6026ff510292890a301c5a 100644 GIT binary patch delta 174 zcmZ2(vfO0DNf9oi5Fp%9l*h>@X{p^24|<>YE1LuBqYp&h)YiRLE824=~+rUpr=o2!Mbnb?ht z3=K_ys`rXY!`Peei%w>YbultEGBq|eG&6K_HZeDKHg$Bev@kX_wlp#|aI$bRva=zm fB9_a}j;pvNv8be?C^e1C)XdC?OI6j?-;E0Z=N~L+ delta 175 zcmX@Fe_nq>p%9lrh@pj*iIJ6&+2m>=LuBqYp&h)*=BcKprYVNHCTWIdo2!Mbnb-{s zEliAns`rXY!`Peei%w>YbvCtdHZ?XgF*Y@EbTT$HadEP6Gc|K_GIuhxbairav9lql fB9_a}j;pvNv8be?C^e1C)XdC?OI6j?-;E0Z9@i~N diff --git a/docs/latex/classNInARow_1_1Heuristic.pdf b/docs/latex/classNInARow_1_1Heuristic.pdf index 62b9eabbc285bde9cbfd89546e7fa81f81adc2c2..b469b806bddfc9db66277d16969803e0ea9a7bfd 100644 GIT binary patch delta 170 zcmdmHw83b@4Ph>$5FW5JL+q6C*1li^-3K4UxIBB0G4KEe*{qj8Y7BP0|d_Ha`-vX3{h; zv@kI;vd}d!Q8zG9*W}Xo%};SjEJ@XHu`)6+GBGeUf~wf;CO(NV&c?#c)WFrv#M#Bv z%+lGy+{xI;+}O#`($dk*z}VE;#KMlSidZf?JFeoA#G;alqSQ1lGXo<-E>%@me>W}w D7iBTY diff --git a/docs/latex/classNInARow_1_1NInARowBestFirstSearch.pdf b/docs/latex/classNInARow_1_1NInARowBestFirstSearch.pdf index 925a7dea649000128d803aeb25afde01580da91a..cae07b811842c2e061b3c24852a3ed947cecb81f 100644 GIT binary patch delta 173 zcmX?Ne8hM|nh2Lsh>@X{p^25T;p74lLuBr1ksZ9INr|SWDQ3yKrUpr=n+rs(nKX@z z3=K_;4RsAn)C~;OHM#VC^HW?BOHwsltc(ndObkqopei}2ZZYG7vJYG*@0#pD%|G5|a*D_{Ts diff --git a/docs/latex/classNode.pdf b/docs/latex/classNode.pdf index 37b0b0fa00fd4a622f49f4cc10d7d44a69b121dc..c6a9b7bb97c707f2b122d9ab5a0bdc3c1a19f144 100644 GIT binary patch delta 174 zcmX@5e@cHtju4koh>@X{p^24|<>WFULuBqop&h)YiRLE824=~+rUpr=o6Cf)nKX@z z3=K_;EOiY`)C~;OHM#VC^HW?BOHwsltc(ndObkqopei=s5}nNGgwd=Xy#_*YUF6>>S_pLJ6qb>5K=LDy|^?0p`I** diff --git a/docs/latex/classSearch.pdf b/docs/latex/classSearch.pdf index e99aca2dcb88cd7719f21eeb978f315fa5d36ac7..5c055a9b45813d859f9cca2760679dd3eafc4c1a 100644 GIT binary patch delta 175 zcmeyb^IvC!q9B)1h>@X{p^24|TSTmWfVE7t%3 delta 175 zcmeyb^IvC!q9B(+h@pj*iIJ6&*<@`&Lu786;11qo^Hft)(-cEplQcuK&DuiNOzZ}R z7A8hO)wv?lF!tttk;#m)magU|=FY~3KuKeBLt_gI7YkD(XE$e8M>A&&BS#}U8-glg dx$Nw?ic1oUN-By{)3{8Hjm)@IRbBnvxBy13D@XtU diff --git a/docs/latex/classmodel__fitting_1_1board__explorer_1_1BoardDisplay.pdf b/docs/latex/classmodel__fitting_1_1board__explorer_1_1BoardDisplay.pdf index fb9df324ed2bd6d715a7ce0b284c3dadac30fc82..d6b3d378f2d533e79ca0fcc39852f3ff389a4b64 100644 GIT binary patch delta 174 zcmaE9_}p+qw=kDch>@X{p^24|<>aZthRECt!aI0P6U|MG4a|~tO%0M#H%}F@X3{h= zGBh+XveY#&Q8zG9*W}Xo%};SjEJ@XHu`)6+GBGeUf~wg3Q*08WlZLvde~gi-L9B9& ek(ptPu^|wfnd%kAR>vm-dB&Oq6-+)aAq4VVq|D#Xkuk#IoVLy5Sg1Jyo1*?(cHw?z${tU)F3H!v!RGJlctf8 zp`nS9rLKXAx`BbZCYQc%eu_(CNvej6m63swiGisRRK@10Vv`x2%$}&|Bn4Bdc4FHJIDlPy3 delta 174 zcmZoQY&G1VF3e>RVrXGyVq|4xHrY_v5Sg1Jyn{E{Jk`|HG{sQYB+bxlv!RGJlcs^8 zg^7`onXZ9}x`BbZCYQc%eu_(CNvej6m63swiGisRRK@10Vv`x2EG=D~os3PK+>8ue hOdU;3EG^xfjhqZz-JBhbj15f9?Q96Cn4Bdc4FHhyDir_# diff --git a/docs/latex/classmodel__fitting_1_1board__explorer_1_1FeatureListItem.pdf b/docs/latex/classmodel__fitting_1_1board__explorer_1_1FeatureListItem.pdf index 93ed09dcfd3ee2dc6be232be8023f7f746a76886..cfe3fc0c846305c2fd25f06d8240be1249779ffb 100644 GIT binary patch delta 175 zcmdmFxXExsh%lE?h>@X{p^24|<>WYFLuBqu;T^oDiRLE824=~+rUpr=o8v^Rnb?ht z3=K_ysuze!!`Pb-iA`pVHE?oub2f5vHF0t=Ff%bQFm-lxHnB7^H+6G0aW=O!u(Khk fB9_a}j;pvNv8be?C^e1C)WX7&OI6j?-;E0Znhz{V delta 175 zcmdmFxXExsh%lEyh@pj*iIJ6&+2lB3LuBqu;T^om=BcKprYVNHCTWIdo8v^Rnb-{s zEliAnsuze!!`Pb-iA`pVH8nGKadES7a&$H^v2-)HFmkapG<0&YG<9+@voLdUwX-3p fB9_a}j;pvNv8be?C^e1C)WX7&OI6j?-;E0ZvN9~7 diff --git a/docs/latex/classmodel__fitting_1_1board__explorer_1_1HeuristicParameters.pdf b/docs/latex/classmodel__fitting_1_1board__explorer_1_1HeuristicParameters.pdf index ed94de4802076dabf2f9cda57388023683cd2f7e..3212c5de13d67af5812efa41021b230df5d68646 100644 GIT binary patch delta 174 zcmexs{MUHHd=W0A5Fq)zrem)xyof)yUP%(8Sr&#LU9k)zR6+&c=w4 fidZf?JFeoA#G;alqSQ1lGb1AdE>%@me>W}wW4tYX delta 174 zcmexs{MUHHd=V~#5JL+q6C*1lv&kz(43W7{M0W5do2QzZnx+`)nxq+;ZC)vA&BShC zXklUmRQ+098phttD=~#J#?0Bx#lXPX)yUGwz}d*r!pO%@me>W}wX^Jg( diff --git a/docs/latex/classmodel__fitting_1_1board__explorer_1_1HeuristicViewToggleRadio.pdf b/docs/latex/classmodel__fitting_1_1board__explorer_1_1HeuristicViewToggleRadio.pdf index cd1fc1b87d58f128f856372e4d831b7e1dcdcd14..5522b1fddc7273ce21e5f15f24b1e85c22db7c9d 100644 GIT binary patch delta 176 zcmZ2tvdUz`84)g{5FpipgA3QUK_}E6xA_ delta 170 zcmZ2wvczP=84)gn5JL+q6C*1lv&q*)43W8lqC0q#%~MTHO;ZeYP0|d_HeVC9X3{h; zv@kI;GSf9MQ8zG9*W}Xo%};SjEJ@XHu`)6+GBGeUf~weTB{7N7PQyMpJSN89BF4bT eKp`W>*w8dN#@O7XGB(D@$lO+wfb?VmDJcLxYb>7t diff --git a/docs/latex/classmodel__fitting_1_1board__explorer_1_1LoadPositionsWidget.pdf b/docs/latex/classmodel__fitting_1_1board__explorer_1_1LoadPositionsWidget.pdf index da835507a9cdb7bcebbb33c521bceddb84e6a44b..1f6f16e44c4de4294c78d9e2045e30354397f67e 100644 GIT binary patch delta 175 zcmZ2ru)tu$At5fK5FVvGc$2DFmQHqb8;~@X{p^25T!Q@UMLuBp|p&h)YNe0QuW~s@#rUpr=n>&TAnb?ht z3=K_ys!xkb!`PeOicV&XHFY$1bTV`^GIVsaaC3DsF}5%;b#^f@vNX3aaB(wpv$G+n fB9_a}j;pvNv8be?C^e1C)XdzBOI6j?-;E0ZkXtSl delta 175 zcmcbse^-A)y%3i{h@pj*iIJ6&+2l?kLuBp|p&h)*=BcKprYVNHCTWIdn>&TAnb-{s zEliAns!xkb!`PeOicV&XHF7aAcXBf}b#pXuwQwNnc3QJBjp#K_Rf(8S8vVDfHZLuBqZ;T^oDNe0QuW~s@#rUpr=n|F&?GqD>P z85)`ZRsR)}hOsxxi%({ZbvAakFmf?;GITU`b9OZ`bF_4|bTf4_ax*nEaW*zEu(Khk fB9_a}j;pvNv8be?C^e1C)Y8I;OI6j?-;E0ZXdf-6 delta 175 zcmeA->Nnc3QJBjh#L&XZ#K_9XZ1QelLuBqZ;T^om=BcKprYVNHCTWIdn|F&?GqD>O zT9_CCRsR)}hOsxxi%({ZHE=OCGjek_b#-;Nba8VraW!-@ws3VdbTPIxbTTlvw6h_o fB9_a}j;pvNv8be?C^e1C)Y8I;OI6j?-;E0ZN8~Mq diff --git a/docs/latex/classmodel__fitting_1_1board__explorer_1_1MoveHistoryListItem.pdf b/docs/latex/classmodel__fitting_1_1board__explorer_1_1MoveHistoryListItem.pdf index 9bbd69096293738ff7ba386d2cd067959a0b394d..49c2c1c6864e45b264f657333c9792892f2e1d81 100644 GIT binary patch delta 174 zcmbPbJj-~4jR==fh>@X{p^25T!DKfPLu78F$PQl9B!lE+v(#i=Q-h?`&2FOBOqxbU zhK44_2D%0&>IMetnq2z6`6(`mC8-)NRz?O!CI+TPP!*e3iBD#9vT!qSb1`spGjlXG ga5QtYG<0!sHnDI83K^K2Il8&n*$`4Oxn5El03nDgga7~l delta 174 zcmbPbJj-~4jR==Ph@pj*iIJ6&*IMetnq2z6`6(`mC8-)NRz?O!CI+TPP!*e3iBD#9a&&cewKO!burM|> huy8hVc6D)fb+s@tH*s}wbh0oowzDCmVsgEtGyv@RD)9gS diff --git a/docs/latex/classmodel__fitting_1_1board__explorer_1_1MoveList.pdf b/docs/latex/classmodel__fitting_1_1board__explorer_1_1MoveList.pdf index 3638df464efa091bd5f3bc20a9cd62e1090d9204..2e919517a5a6177318ca8e001fb3834a3e91a939 100644 GIT binary patch delta 175 zcmeA*>^0n=FU(~WVq|D#Xkuk-FxgVr5Sd#dyo1*?$sjq|EHzoz)F3H!v!#eN6T6X- zp`i&-b+wo@jJxQa^>i%KerQq#ChEliELR8?L5-M9e#<0``d delta 175 zcmeA*>^0n=FU(~SVrXGyVq|4xHrZ0x5Sd#dyn{E{Jk`|HG{sQYB+bxlv!#eN6T5+- zg^3YRb+wo@jJxQa^>i%KerQq#ChEliELR8?L5-M9ekJ}UA6 diff --git a/docs/latex/classmodel__fitting_1_1board__explorer_1_1MoveListItem.pdf b/docs/latex/classmodel__fitting_1_1board__explorer_1_1MoveListItem.pdf index 5685c19dca66dd971dfec8f4d44669903ba82660..76581b99c39bbca2acf3069e8b3629acbdf4fa29 100644 GIT binary patch delta 175 zcmX?Tc+hY|vM`rXh>@X{p^25T!Q@;T^oDNe0QuW~s@#rUpr=n{!31nb?ht z3=K_ys@IE2!`PcIicMyWH8OQ|F>*9?b8;T^om7Un6b$)<+7CTWIdn{!31nb-{s zEliAns@IE2!`PcIicMyWH8C=DHFhy}HFY#Kbu@EwF}84ZH8eDJbhR*YbTM#ov9lql fB9_a}j;pvNv8be?C^e1C)Y8C&OI6j?-;E0Z0*x&b diff --git a/docs/latex/classmodel__fitting_1_1board__explorer_1_1TreeView.pdf b/docs/latex/classmodel__fitting_1_1board__explorer_1_1TreeView.pdf index 271b8368f4663b03968617c3d215a12a1af9e5e7..36f06c042fe934cb3e690924c7b3b497ea87d11d 100644 GIT binary patch delta 151 zcmexs@Yi62yfBwhh>@X{p^25T!DLNgLu77>@D5(nB!lE+v(#i=Q-h?`&6*@DAQ&3-grJWK%<3lQcuK&6*U3378d3Pu1-#_E^ekSW=;mqE*9pNF3#qrPKGXKb~Xf5 JOiq-L0RW_KCEWl3 diff --git a/docs/latex/classmodel__fitting_1_1examples_1_1ModifiedBestFirstSearch.pdf b/docs/latex/classmodel__fitting_1_1examples_1_1ModifiedBestFirstSearch.pdf index 392e11a3bfc6a565656df51d2e683cf6f9f34513..dd778a9d2fdc48476ce8368ab1ff15e479a8c068 100644 GIT binary patch delta 175 zcmaE4^~h=iiv*WZh>@X{p^25T!DK!OLu9U}#13B5B!lE+v(#i=Q-h?`&3uy9OzcKR zhK43U)dAAdF!tsm>B)?-j;4+l#xBmzW~NS-1||j;W{!p~Zf4E~mZqj=&gO2;b~Xf6 f#B$l$aTS*&7L`;KrKWM28(3I!sj9mAyKw;kGHEMc delta 175 zcmaE4^~h=iiv*WJh@pj*iIJ6&`D8u`Lu9U}#17tM3-grJWK%<3lQcuK&3uy9OzZ}R z7A8hO)dAAdF!tsm>B)?-ZU!!9#%8W=#s-e&rfzPohDI(X#>STBj&7zdCa#V~b~Xf6 f#B$l$aTS*&7L`;KrKWM28(3I!sj9mAyKw;kCqOGx diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1AbstractSearch.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1AbstractSearch.pdf index d3767aff1ec26b55b70ba1d832104e0e65d0e524..6ed65e7aa04e477d305a473b6364cc44b2e3eb91 100644 GIT binary patch delta 174 zcmca-b_$e0 zh9*GOKGM=K_U1h4$&9h)mTs;{Gw zCPqNjKGM=K_U1h4$&9hCuCA8G#s+3)MsB7i21c$<#%4~=hAx)oMy7@)#zvNQHUw3~ ea@pB&6_+Fyl~fd^rg51YSeSCDs=E5SaRC74C@Osb diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1BFSNodeVector.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1BFSNodeVector.pdf index a656c83ca453f4782b41ffab44ef84cfd5f7ef14..35b12f545e051be859b2281ea4815d6a613ec53d 100644 GIT binary patch delta 175 zcmZ2zu+U(`VIeM~5F@X{p^25T!DJo@Lu9VI#13B5B!lE+v(#i=Q-h?`%{-FUOzcKR zhK43U)qc{_F!tsG>B)?-j?S(|j)rb-rp|6|h6aWP7N%yVj%F4n2BuC128J#cb~Xf6 f#B$l$aTS*&7L`;KrKWM28(5fgsj9mAyKw;k9>*&G delta 175 zcmaE0^}uQalLVJRh@pj*iIJ6&`D7jmLu9VI#17tM3-grJWK%<3lQcuK%{-FUOzZ}R z7A8hO)qc{_F!tsG>B)?-CI&_ZPUeQjW+p}ku5K1iu0|#%PNoJX=H@1*Zl)&2b~Xf6 f#B$l$aTS*&7L`;KrKWM28(5fgsj9mAyKw;k;*Bax diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1BoardVector.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1BoardVector.pdf index 32f7c5fbbd636356c4864329a6ebb71aca71131e..9b46d50219fe3555b43492627dd4db0ebc146ca7 100644 GIT binary patch delta 175 zcmcbpcTsP{XF)Eb5FaWOJ@X{p^25T!DLNALu77>;0|8XB!lE+v(#i=Q-h?`&6+~iOzcKR zhK43U)!8D_F!ttNk;#m)rml`IrUq_Kj;4;5ZqBY2#x9Po&Sr+@jwS{M&Q6Z5b~Xf6 f#B$l$aTS*&7L`;KrKWM28XK8#sj9mAyKw;kr>`u1 delta 175 zcmeyX^H*nsydalBh@pj*iIJ6&`D9H&Lu77>;11qo3-grJWK%<3lQcuK&6+~iOzZ}R z7A8hO)!8D_F!ttNk;#m)mM)IQMrI~vE~aiyhR%jYPEKylj;5x@Mvg|7P9`o!b~Xf6 e#B$l$aTS*&7L`;KrKWKK^_p<0s=E5SaRC5tk}J0W diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1FeatureGroupWeight.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1FeatureGroupWeight.pdf index 1c60abaa7045e488656776351cb0f7bca2082d7c..2c4c2935f28dfbad92a831f68022756a33f777a6 100644 GIT binary patch delta 175 zcmca;c+qe}u`riWh>@X{p^25T!Q@(DLuBp_;T^oDNe0QuW~s@#rUpr=n`=d^nb?ht z3=K_ys`raY!`Pc2icMyWH83!>bTu({b#yZ_uyk>BHZ*fGadmQaH8yp2a&k2^v9lql fB9_a}j;pvNv8be?C^e1C)Y8a+OI6j?-;E0ZVsG%+_YG%<5>vH;R{HUw3~ ea@pB&6_+Fyl~fd^rg52C8X0h@s=E5SaRC4)M=aw2 diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1FeatureGroupWeightVector.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1FeatureGroupWeightVector.pdf index 2cefea37108ec2f4b39c40b705d062104df6d9f0..2dbb7ecd3a7d04b3e658887eac2a1d94c8691199 100644 GIT binary patch delta 174 zcmbPbG|Oni9$_w{5FaqycuXE5ZN( delta 174 zcmbPbG|Oni9$_wn5JL+q6C*1l^U24A4UxHwB0G4KEzDC=lT8hEP0|d_HXjqQX3{h; zv@kI;GS@XQQ8zG9*W}Xo%};SjEJ@XHu`)6+GBGeUf~wf8B|e$a$<*A;)yde&*x10x h(#_D+)y2`x$<@-y#MsT$#mwBu+0KTLipl>aqych{ECK)k diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1FeatureWithMetadataVector.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1FeatureWithMetadataVector.pdf index 5a8226065b916d2c3257613330df4004c4df4378..0ca5a9e9dafab0ea2faf5ed30f7def84560515f7 100644 GIT binary patch delta 175 zcmZoNY%<)SBFtqJVq|D#Xkuk-Fj-I75Sg1Pyo1*?$sjq|EHzoz)F3H!vz~}G6T6X- zp`i&-b%B^PjJxQa^>i%KerQq#ChEldo#R8?L5-M9b?vnzoB delta 175 zcmZoNY%<)SBFtqFVrXGyVq|4xK3PxL5Sg1Pyn{E{!aOB4+0;hjwM^h6EM-xYLS0iI5I~#&3 eV!7<>xQa^>i%KerQq#ChEldo#R8?L5-M9efM=JpU diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1MoveVector.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1MoveVector.pdf index 33696dbc443cb1d102b1a3fb407e35802fa1ee14..52dcc31323bb648c5c1412ce7c295bd79519fadf 100644 GIT binary patch delta 152 zcmcbuds}xytss|Ch>@X{p^25T;pBEfLuBqD!5zG&Nr|SWDQ3yKrUpr=o7;t~nb?ht z3=K_ys!xhY!`Pc&i%e#8GBYwVH+3;Gbu)Kzb~G_EFm`n{H*z*KGcHhR9rJi5i${nb?ht z3=K_ys=cJ8VeHL0(vumTOq|`E%q?8Zoea#(Ee&0a%q`q34IC{kT}&-3Ow61u?Q96C JnCvJk4FKwyCA9zm delta 152 zcmca(b;oMMKXERD5JL+q6C*1li^&`khR9rJi5i${nb-{s zEliAns=cJ8VeHL0(vumT%uOv^9L*e^jZ9pOom@@LER76}EuEa5oGlzpoy`nf>}&|B JnCvJk4FJd-C5He2 diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1NodeVector.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1NodeVector.pdf index 1870b28baedf8826962d0bdaf49a071a08b7f2a1..16aac5c961c401e4222f938a3e415add19bac67e 100644 GIT binary patch delta 152 zcmeyP^G9ccoFJD`h>@X{p^25T;baX#Lu78U;0|8Xq(oEG6tiSqQ-h?`%^E`1OzcKR zhK43U)mb9aF!tsik;#lsPR?!?mIfx4jxNS7uI9#;u9i-YZqDWgmX@X#PEKx)b~c1m JOimP&1^~kECMf^_ delta 152 zcmeyP^G9ccoFJD$h@pj*iIJ6&#bgaZLu78U;11qoOG7gYqZC73lQcuK%^E`1OzZ}R z7A8hO)mb9aF!tsik;#lsj;@BL7A{U^rUsVgPL9qdZl>mjZZ0MUMlR-tF0RHdb~c1m JOimP&1^|pmC0PIf diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1SizeTVector.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1SizeTVector.pdf index 04e3b10cc4238af4a14c2f901ece184793018c8c..58cb7199b897a7408d05c190bf826be928492aa9 100644 GIT binary patch delta 174 zcmX@7cTR7^2SF~Q5F5JL+q6C*1li^;D94UxI3LOXbqEe*{qj8Y7BP0|d_Hop?GW@0xm zv@kIOs@4&ehOsyMiB4vWH8iwzF|{x>HnA{qGB&X^b~QFKb#b;da5AtowRE;Hx3eLr fB9_a}j;pvNv8be?C^e1C)YQ(f|%iEGGZ} delta 174 zcmX?ZaNJ(g66mEKL9a diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1__SwigNonDynamicMeta.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1__SwigNonDynamicMeta.pdf index e9021895423d16c87aabc8e00c6c10e08c8f34f5..4fb386bd23631e783b4c2f6ed3c98f26b98cc65a 100644 GIT binary patch delta 174 zcmaEE_}p+qr!bdMh>@X{p^25T!Q{!phRED=!aI0PlMIrR%~F$fO%0M#H%}I^X3{h= zGBh+XHqbRNQ8zG9*W}Xo%};SjEJ@XHu`)6+GBGeUf~wg3U2HO=lcRx~lZBbHiKU^5 iiL0BrrGcA^xtXze*rF|5FmH7nb?ht z3=K_ys=Y;|VeHMhB9j?oO)QvmEGnreN=@T3HL^6~QdM>JcjE#8s&6bJ delta 175 zcmcbsb601>e*rFo5JL+q6C*1l^U0iohR9qO!5zHG7Un6b$)<+7CTWIdn>mH7nb-{s zEliAns=Y;|VeHMhB9j?oO^w}5%v>BD4UAn)U7ekr-7E|ZoDE&f&0H;}&|C fh~=`g<0>vmEGnreN=@T3HL^6~QdM>JcjE#8k$x-G diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1fourbynine__feature__evaluator.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1fourbynine__feature__evaluator.pdf index 6a7d4d671779dd80b94f9afa0e26d3ec3577c1e1..0d592de38799ba6c1ea3c483eb450732c5c5dd5d 100644 GIT binary patch delta 175 zcmX@Cdsufvsvwt9h>@X{p^25T;pBWlLuBqM!5zG&Nr|SWDQ3yKrUpr=oAZUNnb?ht z3=K_ysyB*A!`PcIi%e#Wb#pa$HZZX?HgqvGGBYtZG_i0raxphCa5gY=F)}o=u(Khk fB9_a}j;pvNv8be?C^e1C)Y#I5OI6j?-;E0Z(uXWO delta 175 zcmX@Cdsufvsvws^h@pj*iIJ6&`Q&^-LuBqM!5zHG7Un6b$)<+7CTWIdoAZUNnb-{s zEliAnsyB*A!`PcIi%e#WHFtEeFf%f9F*devax^q^ax*Y-F>*FFaj|eQax%9xw6h_o fB9_a}j;pvNv8be?C^e1C)Y#I5OI6j?-;E0Z^;ay? diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1fourbynine__game__tree__node.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1fourbynine__game__tree__node.pdf index c285333f7d510d7e68d255c62f640e8a7ad1953a..a8b2d0960c2f9cfdfd7d6d322006b9115636752f 100644 GIT binary patch delta 175 zcmdm>w?S{iB|$Eu5F!Wubu)BxG_Z6saB^~XGj?$?F?KSyu(Khk fB9_a}j;pvNv8be?C^e1C)YQP3OI6j?-;E0Z;+`yx delta 175 zcmdm>w?S{iB|$EO5JL+q6C*1l^T~Gv4UxIxLOXbqEzDC=lT8hEP0|d_Hs2AlW@0xm zv@kIOs+JR#hOsw0h)!mVb#XE>F)(#CHFq^LbTTxuaC0$sG;lR@HZ?Oabuo2yw6h_o fB9_a}j;pvNv8be?C^e1C)YQP3OI6j?-;E0Z)ZQ#X diff --git a/docs/latex/classmodel__fitting_1_1fourbynine_1_1fourbynine__heuristic.pdf b/docs/latex/classmodel__fitting_1_1fourbynine_1_1fourbynine__heuristic.pdf index fee9458c92ca94d3a6fce3927e917808f5a2a69b..bc2c732380e424476a6e0adfb7a7da4f08fd54c7 100644 GIT binary patch delta 174 zcmdm?yF+(FlpvQ;h>@X{p^25T;p7xSLuBrJ!5zG&Nr|SWDQ3yKrUpr=n^T0WnKX@z z3=K_;4RsAn)C~;OHM#VC^HW?BOHwsltc(ndObkqopei<>5Sh&AWMSZD}Kg|WM*P+;%ek(Xyj;QZf8SC#pJnS(g0c&D|7$= delta 174 zcmdm?yF+(FlpvQuh@pj*iIJ6&`Q#KqLuBrJ!5zHG7Un6b$)<+7CTWIdn^T0WnKTUy zEliAz%ykV+)C~;OHM#VC^HW?BOHwsltc(ndObkqopei<>5Sh&AxuLO(fw`NrsjI7rfq{#qft?Kj6_am>%K!k(Ff0B5 delta 173 zcmeyO|3!bpG$Ag75JL+q6C*1l^T`W@43W9Fg?8{JTbQS$CYu`Snxq+;ZC)U3&7^5y zXklVxWUgyqqHbWIuF0kEo1fy6SdyyYVr67tWMW`y1XZz_MQk#oqnoL@k)@-fv#G18 itBHY=nW2G;xv7zbxw(^}fti_^ft?Kj6_am>%K!k@X{p^25T;p8eoLuBq&!5zG&Nr|SWDQ3yKrUpr=o2!JZnb?ht z3=K_ys`rRU!`PeeiA-jUHMBG}b~UvyHa0hKGd8v~bu~72bu=_}F|l+tHgGhww6h_o fB9_a}j;pvNv8be?C^e1C)WpD)OI6j?-;E0Z1obSd delta 175 zcmX@7dro&lfgqPbh@pj*iIJ6&#pEhMLuBq&!5zHGmWE~)Mk$86CTWIdo2!JZnb-{s zEliAns`rRU!`PeeiA-jUwXiUCvNUutce8YIGITO9b2PWKbTxBvb~LnfGjlUBw6h_o fB9_a}j;pvNv8be?C^e1C)WpD)OI6j?-;E0Z1#m47 diff --git a/docs/latex/ninarow__vectorized__feature__evaluator_8h_source.tex b/docs/latex/ninarow__vectorized__feature__evaluator_8h_source.tex index 8dfb21f..1556413 100644 --- a/docs/latex/ninarow__vectorized__feature__evaluator_8h_source.tex +++ b/docs/latex/ninarow__vectorized__feature__evaluator_8h_source.tex @@ -15,7 +15,7 @@ \DoxyCodeLine{00020\ \textcolor{keyword}{template}\ } \DoxyCodeLine{00021\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter}{VectorizedBitsetCounter}}\ \{} \DoxyCodeLine{00022\ \ \textcolor{keyword}{private}:} -\DoxyCodeLine{00028\ \ \ Eigen::Matrix\ bitset\_matrix;} +\DoxyCodeLine{00028\ \ \ Eigen::Matrix\ bitset\_matrix;} \DoxyCodeLine{00029\ } \DoxyCodeLine{00038\ \ \ \textcolor{keyword}{static}\ Eigen::Vector\ bitset\_to\_vector(} \DoxyCodeLine{00039\ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::bitset\ \&bitset)\ \{} @@ -28,7 +28,7 @@ \DoxyCodeLine{00046\ } \DoxyCodeLine{00055\ \ \ \textcolor{keyword}{static}\ Eigen::Matrix\ bitsets\_to\_matrix(} \DoxyCodeLine{00056\ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::vector>\ \&bitsets)\ \{} -\DoxyCodeLine{00057\ \ \ \ \ Eigen::Matrix\ matrix;} +\DoxyCodeLine{00057\ \ \ \ \ Eigen::Matrix\ matrix(0,\ N);} \DoxyCodeLine{00058\ \ \ \ \ matrix.conservativeResize(bitsets.size(),\ Eigen::NoChange);} \DoxyCodeLine{00059\ \ \ \ \ \textcolor{keywordflow}{for}\ (std::size\_t\ i\ =\ 0;\ i\ <\ bitsets.size();\ ++i)\ \{} \DoxyCodeLine{00060\ \ \ \ \ \ \ matrix.row(i)\ =\ bitset\_to\_vector(bitsets[i]);} @@ -37,77 +37,78 @@ \DoxyCodeLine{00063\ \ \ \}} \DoxyCodeLine{00064\ } \DoxyCodeLine{00065\ \ \textcolor{keyword}{public}:} -\DoxyCodeLine{00069\ \ \ \mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_abe9af7e3f665f02ebe9f420cdfffcf78}{VectorizedBitsetCounter}}()\ :\ bitset\_matrix(0,\ N)\ \{\}} +\DoxyCodeLine{00069\ \ \ \mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_abe9af7e3f665f02ebe9f420cdfffcf78}{VectorizedBitsetCounter}}()\ :\ bitset\_matrix(N,\ 0)\ \{\}} \DoxyCodeLine{00070\ } \DoxyCodeLine{00078\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_a115251e40b50e630e7d6b321e1e3a6aa}{register\_bitset}}(\textcolor{keyword}{const}\ std::bitset\ \&bitset)\ \{} -\DoxyCodeLine{00079\ \ \ \ \ bitset\_matrix.conservativeResize(bitset\_matrix.rows()\ +\ 1,\ Eigen::NoChange);} -\DoxyCodeLine{00080\ \ \ \ \ bitset\_matrix.row(bitset\_matrix.rows()\ -\/\ 1)\ =\ bitset\_to\_vector(bitset);} +\DoxyCodeLine{00079\ \ \ \ \ bitset\_matrix.conservativeResize(Eigen::NoChange,\ bitset\_matrix.cols()\ +\ 1);} +\DoxyCodeLine{00080\ \ \ \ \ bitset\_matrix.col(bitset\_matrix.cols()\ -\/\ 1)\ =\ bitset\_to\_vector(bitset);} \DoxyCodeLine{00081\ \ \ \}} \DoxyCodeLine{00082\ } \DoxyCodeLine{00096\ \ \ std::vector>\ \mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_a1f020b03eb3d6394426e6731600c29f2}{query}}(} \DoxyCodeLine{00097\ \ \ \ \ \ \ std::vector>\ bitsets)\textcolor{keyword}{\ const\ }\{} -\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keyword}{const}\ Eigen::Matrix} -\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ count\_results\ =\ bitsets\_to\_matrix(bitsets)\ *\ bitset\_matrix.transpose();} -\DoxyCodeLine{00100\ \ \ \ \ std::vector>\ output;} -\DoxyCodeLine{00101\ \ \ \ \ \textcolor{keywordflow}{for}\ (std::size\_t\ i\ =\ 0;\ i\ <\ bitsets.size();\ ++i)\ \{} -\DoxyCodeLine{00102\ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ start\_address\ =} -\DoxyCodeLine{00103\ \ \ \ \ \ \ \ \ \ \ count\_results.data()\ +\ i\ *\ count\_results.cols();} -\DoxyCodeLine{00104\ \ \ \ \ \ \ output.push\_back(\{start\_address,\ start\_address\ +\ count\_results.cols()\});} -\DoxyCodeLine{00105\ \ \ \ \ \}} -\DoxyCodeLine{00106\ \ \ \ \ \textcolor{keywordflow}{return}\ output;} -\DoxyCodeLine{00107\ \ \ \}} -\DoxyCodeLine{00108\ \};} -\DoxyCodeLine{00109\ } -\DoxyCodeLine{00116\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ Board>} -\DoxyCodeLine{00117\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator}{VectorizedFeatureEvaluator}}\ \{} -\DoxyCodeLine{00118\ \ \textcolor{keyword}{private}:} -\DoxyCodeLine{00122\ \ \ std::size\_t\ feature\_count;} -\DoxyCodeLine{00123\ } -\DoxyCodeLine{00129\ \ \ \mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter}{VectorizedBitsetCounter}}\ feature\_pieces\_bitsets;} -\DoxyCodeLine{00130\ } -\DoxyCodeLine{00136\ \ \ \mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter}{VectorizedBitsetCounter}}\ feature\_spaces\_bitsets;} -\DoxyCodeLine{00137\ } -\DoxyCodeLine{00138\ \ \textcolor{keyword}{public}:} -\DoxyCodeLine{00142\ \ \ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a79ed063a4a443ffc4d17343867fe5b75}{VectorizedFeatureEvaluator}}()} -\DoxyCodeLine{00143\ \ \ \ \ \ \ :\ feature\_count(0),\ feature\_pieces\_bitsets(),\ feature\_spaces\_bitsets()\ \{\}} -\DoxyCodeLine{00144\ } -\DoxyCodeLine{00152\ \ \ std::size\_t\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a64b557eef6163708c1d4eed2152e0452}{register\_feature}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNInARow_1_1HeuristicFeature}{HeuristicFeature}}\ \&feature)\ \{} -\DoxyCodeLine{00153\ \ \ \ \ feature\_pieces\_bitsets.\mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_a115251e40b50e630e7d6b321e1e3a6aa}{register\_bitset}}(feature.\mbox{\hyperlink{classNInARow_1_1HeuristicFeature_a3390a4a1b054927db751b8cae0e6cd78}{pieces}}.\mbox{\hyperlink{classNInARow_1_1Pattern_a5021ed3ff7f8b6d07ea6c0151ecd0467}{positions}});} -\DoxyCodeLine{00154\ \ \ \ \ feature\_spaces\_bitsets.\mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_a115251e40b50e630e7d6b321e1e3a6aa}{register\_bitset}}(feature.\mbox{\hyperlink{classNInARow_1_1HeuristicFeature_af8ac0a2e61c7881f5b4dc31f9706d56d}{spaces}}.\mbox{\hyperlink{classNInARow_1_1Pattern_a5021ed3ff7f8b6d07ea6c0151ecd0467}{positions}});} -\DoxyCodeLine{00155\ \ \ \ \ \textcolor{keywordflow}{return}\ feature\_count++;} -\DoxyCodeLine{00156\ \ \ \}} -\DoxyCodeLine{00157\ } -\DoxyCodeLine{00169\ \ \ std::vector>\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a90503ebd711f8fe8cade5aa13d4237ac}{query\_pieces}}(} -\DoxyCodeLine{00170\ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::vector\ \&boards,\ Player\ player)\textcolor{keyword}{\ const\ }\{} -\DoxyCodeLine{00171\ \ \ \ \ std::vector>\ positions;} -\DoxyCodeLine{00172\ \ \ \ \ positions.reserve(boards.size());} -\DoxyCodeLine{00173\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&board\ :\ boards)\ \{} -\DoxyCodeLine{00174\ \ \ \ \ \ \ positions.push\_back(board.get\_pieces(player).positions);} -\DoxyCodeLine{00175\ \ \ \ \ \}} -\DoxyCodeLine{00176\ \ \ \ \ \textcolor{keywordflow}{return}\ feature\_pieces\_bitsets.\mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_a1f020b03eb3d6394426e6731600c29f2}{query}}(positions);} -\DoxyCodeLine{00177\ \ \ \}} -\DoxyCodeLine{00178\ } -\DoxyCodeLine{00188\ \ \ std::vector>\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a04bc304abc09bf77efebd388cf57c5aa}{query\_spaces}}(} -\DoxyCodeLine{00189\ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::vector\ \&boards)\textcolor{keyword}{\ const\ }\{} -\DoxyCodeLine{00190\ \ \ \ \ std::vector>\ spaces;} -\DoxyCodeLine{00191\ \ \ \ \ spaces.reserve(boards.size());} -\DoxyCodeLine{00192\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&board\ :\ boards)\ \{} -\DoxyCodeLine{00193\ \ \ \ \ \ \ spaces.push\_back(board.get\_spaces().positions);} -\DoxyCodeLine{00194\ \ \ \ \ \}} -\DoxyCodeLine{00195\ \ \ \ \ \textcolor{keywordflow}{return}\ feature\_spaces\_bitsets.\mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_a1f020b03eb3d6394426e6731600c29f2}{query}}(spaces);} -\DoxyCodeLine{00196\ \ \ \}} -\DoxyCodeLine{00197\ } -\DoxyCodeLine{00204\ \ \ std::vector\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a66a7eb771e13a334a98e48c710b13cc0}{query\_pieces}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNInARow_1_1Board}{Board}}\ \&board,} -\DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Player\ player)\textcolor{keyword}{\ const\ }\{} -\DoxyCodeLine{00206\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a90503ebd711f8fe8cade5aa13d4237ac}{query\_pieces}}(std::vector\{board\},\ player)[0];} -\DoxyCodeLine{00207\ \ \ \}} -\DoxyCodeLine{00208\ } -\DoxyCodeLine{00209\ \ \ std::vector\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a04bc304abc09bf77efebd388cf57c5aa}{query\_spaces}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNInARow_1_1Board}{Board}}\ \&board)\textcolor{keyword}{\ const\ }\{} -\DoxyCodeLine{00210\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a04bc304abc09bf77efebd388cf57c5aa}{query\_spaces}}(std::vector\{board\})[0];} -\DoxyCodeLine{00211\ \ \ \}} -\DoxyCodeLine{00215\ \};} -\DoxyCodeLine{00216\ \}\ \ \textcolor{comment}{//\ namespace\ NInARow}} -\DoxyCodeLine{00217\ } -\DoxyCodeLine{00218\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ NINAROW\_VECTORIZED\_FEATURE\_EVALUATOR\_H\_INCLUDED}} +\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ m\ =\ bitsets\_to\_matrix(bitsets);} +\DoxyCodeLine{00099\ \ \ \ \ \textcolor{keyword}{const}\ Eigen::Matrix} +\DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ count\_results\ =\ m\ *\ bitset\_matrix;} +\DoxyCodeLine{00102\ \ \ \ \ std::vector>\ output;} +\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keywordflow}{for}\ (std::size\_t\ i\ =\ 0;\ i\ <\ bitsets.size();\ ++i)\ \{} +\DoxyCodeLine{00104\ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ row\ =\ count\_results.row(i);} +\DoxyCodeLine{00105\ \ \ \ \ \ \ output.emplace\_back(row.data(),\ row.data()\ +\ row.size());} +\DoxyCodeLine{00106\ \ \ \ \ \}} +\DoxyCodeLine{00107\ \ \ \ \ \textcolor{keywordflow}{return}\ output;} +\DoxyCodeLine{00108\ \ \ \}} +\DoxyCodeLine{00109\ \};} +\DoxyCodeLine{00110\ } +\DoxyCodeLine{00117\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ Board>} +\DoxyCodeLine{00118\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator}{VectorizedFeatureEvaluator}}\ \{} +\DoxyCodeLine{00119\ \ \textcolor{keyword}{private}:} +\DoxyCodeLine{00123\ \ \ std::size\_t\ feature\_count;} +\DoxyCodeLine{00124\ } +\DoxyCodeLine{00130\ \ \ \mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter}{VectorizedBitsetCounter}}\ feature\_pieces\_bitsets;} +\DoxyCodeLine{00131\ } +\DoxyCodeLine{00137\ \ \ \mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter}{VectorizedBitsetCounter}}\ feature\_spaces\_bitsets;} +\DoxyCodeLine{00138\ } +\DoxyCodeLine{00139\ \ \textcolor{keyword}{public}:} +\DoxyCodeLine{00143\ \ \ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a79ed063a4a443ffc4d17343867fe5b75}{VectorizedFeatureEvaluator}}()} +\DoxyCodeLine{00144\ \ \ \ \ \ \ :\ feature\_count(0),\ feature\_pieces\_bitsets(),\ feature\_spaces\_bitsets()\ \{\}} +\DoxyCodeLine{00145\ } +\DoxyCodeLine{00153\ \ \ std::size\_t\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a64b557eef6163708c1d4eed2152e0452}{register\_feature}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNInARow_1_1HeuristicFeature}{HeuristicFeature}}\ \&feature)\ \{} +\DoxyCodeLine{00154\ \ \ \ \ feature\_pieces\_bitsets.\mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_a115251e40b50e630e7d6b321e1e3a6aa}{register\_bitset}}(feature.\mbox{\hyperlink{classNInARow_1_1HeuristicFeature_a3390a4a1b054927db751b8cae0e6cd78}{pieces}}.\mbox{\hyperlink{classNInARow_1_1Pattern_a5021ed3ff7f8b6d07ea6c0151ecd0467}{positions}});} +\DoxyCodeLine{00155\ \ \ \ \ feature\_spaces\_bitsets.\mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_a115251e40b50e630e7d6b321e1e3a6aa}{register\_bitset}}(feature.\mbox{\hyperlink{classNInARow_1_1HeuristicFeature_af8ac0a2e61c7881f5b4dc31f9706d56d}{spaces}}.\mbox{\hyperlink{classNInARow_1_1Pattern_a5021ed3ff7f8b6d07ea6c0151ecd0467}{positions}});} +\DoxyCodeLine{00156\ \ \ \ \ \textcolor{keywordflow}{return}\ feature\_count++;} +\DoxyCodeLine{00157\ \ \ \}} +\DoxyCodeLine{00158\ } +\DoxyCodeLine{00170\ \ \ std::vector>\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a90503ebd711f8fe8cade5aa13d4237ac}{query\_pieces}}(} +\DoxyCodeLine{00171\ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::vector\ \&boards,\ Player\ player)\textcolor{keyword}{\ const\ }\{} +\DoxyCodeLine{00172\ \ \ \ \ std::vector>\ positions;} +\DoxyCodeLine{00173\ \ \ \ \ positions.reserve(boards.size());} +\DoxyCodeLine{00174\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&board\ :\ boards)\ \{} +\DoxyCodeLine{00175\ \ \ \ \ \ \ positions.push\_back(board.get\_pieces(player).positions);} +\DoxyCodeLine{00176\ \ \ \ \ \}} +\DoxyCodeLine{00177\ \ \ \ \ \textcolor{keywordflow}{return}\ feature\_pieces\_bitsets.\mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_a1f020b03eb3d6394426e6731600c29f2}{query}}(positions);} +\DoxyCodeLine{00178\ \ \ \}} +\DoxyCodeLine{00179\ } +\DoxyCodeLine{00189\ \ \ std::vector>\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a04bc304abc09bf77efebd388cf57c5aa}{query\_spaces}}(} +\DoxyCodeLine{00190\ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::vector\ \&boards)\textcolor{keyword}{\ const\ }\{} +\DoxyCodeLine{00191\ \ \ \ \ std::vector>\ spaces;} +\DoxyCodeLine{00192\ \ \ \ \ spaces.reserve(boards.size());} +\DoxyCodeLine{00193\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&board\ :\ boards)\ \{} +\DoxyCodeLine{00194\ \ \ \ \ \ \ spaces.push\_back(board.get\_spaces().positions);} +\DoxyCodeLine{00195\ \ \ \ \ \}} +\DoxyCodeLine{00196\ \ \ \ \ \textcolor{keywordflow}{return}\ feature\_spaces\_bitsets.\mbox{\hyperlink{classNInARow_1_1VectorizedBitsetCounter_a1f020b03eb3d6394426e6731600c29f2}{query}}(spaces);} +\DoxyCodeLine{00197\ \ \ \}} +\DoxyCodeLine{00198\ } +\DoxyCodeLine{00205\ \ \ std::vector\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a66a7eb771e13a334a98e48c710b13cc0}{query\_pieces}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNInARow_1_1Board}{Board}}\ \&board,} +\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Player\ player)\textcolor{keyword}{\ const\ }\{} +\DoxyCodeLine{00207\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a90503ebd711f8fe8cade5aa13d4237ac}{query\_pieces}}(std::vector\{board\},\ player)[0];} +\DoxyCodeLine{00208\ \ \ \}} +\DoxyCodeLine{00209\ } +\DoxyCodeLine{00210\ \ \ std::vector\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a04bc304abc09bf77efebd388cf57c5aa}{query\_spaces}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNInARow_1_1Board}{Board}}\ \&board)\textcolor{keyword}{\ const\ }\{} +\DoxyCodeLine{00211\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classNInARow_1_1VectorizedFeatureEvaluator_a04bc304abc09bf77efebd388cf57c5aa}{query\_spaces}}(std::vector\{board\})[0];} +\DoxyCodeLine{00212\ \ \ \}} +\DoxyCodeLine{00216\ \};} +\DoxyCodeLine{00217\ \}\ \ \textcolor{comment}{//\ namespace\ NInARow}} +\DoxyCodeLine{00218\ } +\DoxyCodeLine{00219\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ NINAROW\_VECTORIZED\_FEATURE\_EVALUATOR\_H\_INCLUDED}} \end{DoxyCode} diff --git a/docs/ninarow__heuristic_8h_source.html b/docs/ninarow__heuristic_8h_source.html index d2746d2..f4836be 100644 --- a/docs/ninarow__heuristic_8h_source.html +++ b/docs/ninarow__heuristic_8h_source.html @@ -482,10 +482,10 @@
Definition: ninarow_move.h:15
Definition: ninarow_pattern.h:20
std::vector< std::size_t > get_all_position_indices() const
Definition: ninarow_pattern.h:344
-
Definition: ninarow_vectorized_feature_evaluator.h:117
-
std::vector< std::vector< std::size_t > > query_spaces(const std::vector< Board > &boards) const
Definition: ninarow_vectorized_feature_evaluator.h:188
-
std::size_t register_feature(const HeuristicFeature< Board > &feature)
Definition: ninarow_vectorized_feature_evaluator.h:152
-
std::vector< std::vector< std::size_t > > query_pieces(const std::vector< Board > &boards, Player player) const
Definition: ninarow_vectorized_feature_evaluator.h:169
+
Definition: ninarow_vectorized_feature_evaluator.h:118
+
std::vector< std::vector< std::size_t > > query_spaces(const std::vector< Board > &boards) const
Definition: ninarow_vectorized_feature_evaluator.h:189
+
std::size_t register_feature(const HeuristicFeature< Board > &feature)
Definition: ninarow_vectorized_feature_evaluator.h:153
+
std::vector< std::vector< std::size_t > > query_pieces(const std::vector< Board > &boards, Player player) const
Definition: ninarow_vectorized_feature_evaluator.h:170
Definition: game_tree_node.h:16
Definition: ninarow_heuristic.h:23
double weight_pass
Definition: ninarow_heuristic.h:34
diff --git a/docs/ninarow__vectorized__feature__evaluator_8h_source.html b/docs/ninarow__vectorized__feature__evaluator_8h_source.html index 59921d5..5470441 100644 --- a/docs/ninarow__vectorized__feature__evaluator_8h_source.html +++ b/docs/ninarow__vectorized__feature__evaluator_8h_source.html @@ -86,7 +86,7 @@
20template <std::size_t N>
22 private:
-
28 Eigen::Matrix<std::size_t, Eigen::Dynamic, N> bitset_matrix;
+
28 Eigen::Matrix<std::size_t, N, Eigen::Dynamic> bitset_matrix;
29
38 static Eigen::Vector<std::size_t, N> bitset_to_vector(
39 const std::bitset<N> &bitset) {
@@ -99,7 +99,7 @@
46
55 static Eigen::Matrix<std::size_t, Eigen::Dynamic, N> bitsets_to_matrix(
56 const std::vector<std::bitset<N>> &bitsets) {
-
57 Eigen::Matrix<std::size_t, Eigen::Dynamic, N> matrix;
+
57 Eigen::Matrix<std::size_t, Eigen::Dynamic, N> matrix(0, N);
58 matrix.conservativeResize(bitsets.size(), Eigen::NoChange);
59 for (std::size_t i = 0; i < bitsets.size(); ++i) {
60 matrix.row(i) = bitset_to_vector(bitsets[i]);
@@ -108,78 +108,79 @@
63 }
64
65 public:
-
69 VectorizedBitsetCounter() : bitset_matrix(0, N) {}
+
69 VectorizedBitsetCounter() : bitset_matrix(N, 0) {}
70
78 void register_bitset(const std::bitset<N> &bitset) {
-
79 bitset_matrix.conservativeResize(bitset_matrix.rows() + 1, Eigen::NoChange);
-
80 bitset_matrix.row(bitset_matrix.rows() - 1) = bitset_to_vector(bitset);
+
79 bitset_matrix.conservativeResize(Eigen::NoChange, bitset_matrix.cols() + 1);
+
80 bitset_matrix.col(bitset_matrix.cols() - 1) = bitset_to_vector(bitset);
81 }
82
96 std::vector<std::vector<std::size_t>> query(
97 std::vector<std::bitset<N>> bitsets) const {
-
98 const Eigen::Matrix<std::size_t, Eigen::Dynamic, Eigen::Dynamic>
-
99 count_results = bitsets_to_matrix(bitsets) * bitset_matrix.transpose();
-
100 std::vector<std::vector<std::size_t>> output;
-
101 for (std::size_t i = 0; i < bitsets.size(); ++i) {
-
102 const auto start_address =
-
103 count_results.data() + i * count_results.cols();
-
104 output.push_back({start_address, start_address + count_results.cols()});
-
105 }
-
106 return output;
-
107 }
-
108};
-
109
-
116template <typename Board>
- -
118 private:
-
122 std::size_t feature_count;
-
123
-
129 VectorizedBitsetCounter<Board::get_board_size()> feature_pieces_bitsets;
-
130
-
136 VectorizedBitsetCounter<Board::get_board_size()> feature_spaces_bitsets;
-
137
-
138 public:
- -
143 : feature_count(0), feature_pieces_bitsets(), feature_spaces_bitsets() {}
-
144
-
152 std::size_t register_feature(const HeuristicFeature<Board> &feature) {
-
153 feature_pieces_bitsets.register_bitset(feature.pieces.positions);
-
154 feature_spaces_bitsets.register_bitset(feature.spaces.positions);
-
155 return feature_count++;
-
156 }
-
157
-
169 std::vector<std::vector<std::size_t>> query_pieces(
-
170 const std::vector<Board> &boards, Player player) const {
-
171 std::vector<std::bitset<Board::get_board_size()>> positions;
-
172 positions.reserve(boards.size());
-
173 for (const auto &board : boards) {
-
174 positions.push_back(board.get_pieces(player).positions);
-
175 }
-
176 return feature_pieces_bitsets.query(positions);
-
177 }
-
178
-
188 std::vector<std::vector<std::size_t>> query_spaces(
-
189 const std::vector<Board> &boards) const {
-
190 std::vector<std::bitset<Board::get_board_size()>> spaces;
-
191 spaces.reserve(boards.size());
-
192 for (const auto &board : boards) {
-
193 spaces.push_back(board.get_spaces().positions);
-
194 }
-
195 return feature_spaces_bitsets.query(spaces);
-
196 }
-
197
-
204 std::vector<std::size_t> query_pieces(const Board &board,
-
205 Player player) const {
-
206 return query_pieces(std::vector<Board>{board}, player)[0];
-
207 }
-
208
-
209 std::vector<std::size_t> query_spaces(const Board &board) const {
-
210 return query_spaces(std::vector<Board>{board})[0];
-
211 }
-
215};
-
216} // namespace NInARow
-
217
-
218#endif // NINAROW_VECTORIZED_FEATURE_EVALUATOR_H_INCLUDED
+
98 const auto m = bitsets_to_matrix(bitsets);
+
99 const Eigen::Matrix<std::size_t, Eigen::Dynamic, Eigen::Dynamic,
+
100 Eigen::RowMajor>
+
101 count_results = m * bitset_matrix;
+
102 std::vector<std::vector<std::size_t>> output;
+
103 for (std::size_t i = 0; i < bitsets.size(); ++i) {
+
104 const auto row = count_results.row(i);
+
105 output.emplace_back(row.data(), row.data() + row.size());
+
106 }
+
107 return output;
+
108 }
+
109};
+
110
+
117template <typename Board>
+ +
119 private:
+
123 std::size_t feature_count;
+
124
+
130 VectorizedBitsetCounter<Board::get_board_size()> feature_pieces_bitsets;
+
131
+
137 VectorizedBitsetCounter<Board::get_board_size()> feature_spaces_bitsets;
+
138
+
139 public:
+ +
144 : feature_count(0), feature_pieces_bitsets(), feature_spaces_bitsets() {}
+
145
+
153 std::size_t register_feature(const HeuristicFeature<Board> &feature) {
+
154 feature_pieces_bitsets.register_bitset(feature.pieces.positions);
+
155 feature_spaces_bitsets.register_bitset(feature.spaces.positions);
+
156 return feature_count++;
+
157 }
+
158
+
170 std::vector<std::vector<std::size_t>> query_pieces(
+
171 const std::vector<Board> &boards, Player player) const {
+
172 std::vector<std::bitset<Board::get_board_size()>> positions;
+
173 positions.reserve(boards.size());
+
174 for (const auto &board : boards) {
+
175 positions.push_back(board.get_pieces(player).positions);
+
176 }
+
177 return feature_pieces_bitsets.query(positions);
+
178 }
+
179
+
189 std::vector<std::vector<std::size_t>> query_spaces(
+
190 const std::vector<Board> &boards) const {
+
191 std::vector<std::bitset<Board::get_board_size()>> spaces;
+
192 spaces.reserve(boards.size());
+
193 for (const auto &board : boards) {
+
194 spaces.push_back(board.get_spaces().positions);
+
195 }
+
196 return feature_spaces_bitsets.query(spaces);
+
197 }
+
198
+
205 std::vector<std::size_t> query_pieces(const Board &board,
+
206 Player player) const {
+
207 return query_pieces(std::vector<Board>{board}, player)[0];
+
208 }
+
209
+
210 std::vector<std::size_t> query_spaces(const Board &board) const {
+
211 return query_spaces(std::vector<Board>{board})[0];
+
212 }
+
216};
+
217} // namespace NInARow
+
218
+
219#endif // NINAROW_VECTORIZED_FEATURE_EVALUATOR_H_INCLUDED
Definition: ninarow_board.h:26
Definition: ninarow_heuristic_feature.h:15
Board::PatternT pieces
Definition: ninarow_heuristic_feature.h:20
@@ -189,12 +190,12 @@
void register_bitset(const std::bitset< N > &bitset)
Definition: ninarow_vectorized_feature_evaluator.h:78
std::vector< std::vector< std::size_t > > query(std::vector< std::bitset< N > > bitsets) const
Definition: ninarow_vectorized_feature_evaluator.h:96
VectorizedBitsetCounter()
Definition: ninarow_vectorized_feature_evaluator.h:69
-
Definition: ninarow_vectorized_feature_evaluator.h:117
-
std::vector< std::vector< std::size_t > > query_spaces(const std::vector< Board > &boards) const
Definition: ninarow_vectorized_feature_evaluator.h:188
-
std::size_t register_feature(const HeuristicFeature< Board > &feature)
Definition: ninarow_vectorized_feature_evaluator.h:152
-
std::vector< std::size_t > query_pieces(const Board &board, Player player) const
Definition: ninarow_vectorized_feature_evaluator.h:204
-
VectorizedFeatureEvaluator()
Definition: ninarow_vectorized_feature_evaluator.h:142
-
std::vector< std::vector< std::size_t > > query_pieces(const std::vector< Board > &boards, Player player) const
Definition: ninarow_vectorized_feature_evaluator.h:169
+
Definition: ninarow_vectorized_feature_evaluator.h:118
+
std::vector< std::vector< std::size_t > > query_spaces(const std::vector< Board > &boards) const
Definition: ninarow_vectorized_feature_evaluator.h:189
+
std::size_t register_feature(const HeuristicFeature< Board > &feature)
Definition: ninarow_vectorized_feature_evaluator.h:153
+
std::vector< std::size_t > query_pieces(const Board &board, Player player) const
Definition: ninarow_vectorized_feature_evaluator.h:205
+
VectorizedFeatureEvaluator()
Definition: ninarow_vectorized_feature_evaluator.h:143
+
std::vector< std::vector< std::size_t > > query_pieces(const std::vector< Board > &boards, Player player) const
Definition: ninarow_vectorized_feature_evaluator.h:170