algorhino-anemone 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. {algorhino_anemone-0.1.1.dist-info → algorhino_anemone-0.1.2.dist-info}/METADATA +5 -5
  2. {algorhino_anemone-0.1.1.dist-info → algorhino_anemone-0.1.2.dist-info}/RECORD +40 -40
  3. anemone/factory.py +13 -20
  4. anemone/indices/index_manager/node_exploration_manager.py +12 -13
  5. anemone/node_evaluation/node_direct_evaluation/node_direct_evaluator.py +2 -22
  6. anemone/node_factory/__init__.py +2 -2
  7. anemone/node_factory/algorithm_node_factory.py +8 -8
  8. anemone/node_factory/base.py +8 -7
  9. anemone/node_selector/factory.py +7 -5
  10. anemone/node_selector/node_selector.py +2 -2
  11. anemone/node_selector/opening_instructions.py +8 -9
  12. anemone/node_selector/recurzipf/recur_zipf_base.py +6 -6
  13. anemone/node_selector/sequool/factory.py +3 -8
  14. anemone/node_selector/sequool/sequool.py +26 -41
  15. anemone/node_selector/uniform/uniform.py +9 -7
  16. anemone/nodes/__init__.py +3 -3
  17. anemone/nodes/algorithm_node/algorithm_node.py +5 -5
  18. anemone/nodes/itree_node.py +20 -19
  19. anemone/nodes/tree_node.py +28 -34
  20. anemone/nodes/tree_traversal.py +1 -1
  21. anemone/nodes/utils.py +35 -43
  22. anemone/progress_monitor/progress_monitor.py +32 -30
  23. anemone/recommender_rule/recommender_rule.py +5 -5
  24. anemone/tree_and_value_branch_selector.py +10 -21
  25. anemone/tree_exploration.py +32 -44
  26. anemone/tree_manager/algorithm_node_tree_manager.py +25 -20
  27. anemone/tree_manager/tree_expander.py +15 -15
  28. anemone/tree_manager/tree_manager.py +18 -15
  29. anemone/trees/descendants.py +42 -42
  30. anemone/trees/tree.py +7 -9
  31. anemone/trees/tree_visualization.py +9 -9
  32. anemone/updates/__init__.py +1 -1
  33. anemone/updates/index_block.py +3 -3
  34. anemone/updates/minmax_evaluation_updater.py +3 -3
  35. anemone/updates/updates_file.py +1 -1
  36. anemone/updates/value_block.py +5 -5
  37. anemone/utils/dict_of_numbered_dict_with_pointer_on_max.py +6 -6
  38. {algorhino_anemone-0.1.1.dist-info → algorhino_anemone-0.1.2.dist-info}/WHEEL +0 -0
  39. {algorhino_anemone-0.1.1.dist-info → algorhino_anemone-0.1.2.dist-info}/licenses/LICENSE +0 -0
  40. {algorhino_anemone-0.1.1.dist-info → algorhino_anemone-0.1.2.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: algorhino-anemone
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: anemone searches trees
5
5
  Author-email: Victor Gabillon <victorgabillon@gmail.com>
6
6
  License-Expression: GPL-3.0-only
@@ -83,7 +83,7 @@ from anemone.node_selector.factory import UniformArgs
83
83
  from anemone.node_selector.node_selector_types import NodeSelectorType
84
84
  from anemone.progress_monitor.progress_monitor import (
85
85
  StoppingCriterionTypes,
86
- TreeMoveLimitArgs,
86
+ TreeBranchLimitArgs,
87
87
  )
88
88
  from anemone.recommender_rule.recommender_rule import SoftmaxRule
89
89
 
@@ -91,9 +91,9 @@ from anemone.recommender_rule.recommender_rule import SoftmaxRule
91
91
  args = TreeAndValuePlayerArgs(
92
92
  node_selector=UniformArgs(type=NodeSelectorType.UNIFORM),
93
93
  opening_type=None,
94
- stopping_criterion=TreeMoveLimitArgs(
95
- type=StoppingCriterionTypes.TREE_MOVE_LIMIT,
96
- tree_move_limit=100,
94
+ stopping_criterion=TreeBranchLimitArgs(
95
+ type=StoppingCriterionTypes.TREE_BRANCH_LIMIT,
96
+ tree_branch_limit=100,
97
97
  ),
98
98
  recommender_rule=SoftmaxRule(type="softmax", temperature=1.0),
99
99
  )
@@ -1,14 +1,14 @@
1
- algorhino_anemone-0.1.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
1
+ algorhino_anemone-0.1.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
2
2
  anemone/__init__.py,sha256=iKX9OGJxbyIqe9Fy-xxZY6sdH7WcG4RFyPR0WBai7Ls,942
3
3
  anemone/basics.py,sha256=jMKY9mFLbbMZ_xNvtBVlbZI_vP15rg2tUGUf9ZQ-9tw,1023
4
- anemone/factory.py,sha256=xEE5Nx-I9rs-VyhPHQcGTMKSjbVYKYJCO75s5szLZIg,6544
4
+ anemone/factory.py,sha256=Nmx84UrSqED3R9891XoBTX56jKlINvZn4DLYduSbHgo,6020
5
5
  anemone/state_transition.py,sha256=fxvHZOYRtWV5ExXRIoehdRg9qV6zhgiE5uiCeOc80Dc,1418
6
- anemone/tree_and_value_branch_selector.py,sha256=AicjYcI1M_zrNZK4ZzYGcHjyCXGATkXGn6vn5bjdJ6s,4099
7
- anemone/tree_exploration.py,sha256=718qW-mkHp2-LuMfRLHZoi8Oul_3Aq6kzTr31k_xBII,10881
6
+ anemone/tree_and_value_branch_selector.py,sha256=bervTIx03h79g-Qu1npGpcA5YlSzZKRk0xA86l69jX4,3480
7
+ anemone/tree_exploration.py,sha256=Fb6mNw0UxbaaFtbBAhxjjKJQbClbRPzhrEG2pWHQkjY,10378
8
8
  anemone/indices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  anemone/indices/index_manager/__init__.py,sha256=P49ofGrnP_Nfmv63Rg_-Zvwn5NFvFFDQ3MD3GMeWNWw,515
10
10
  anemone/indices/index_manager/factory.py,sha256=Fti6PTnLOEg0g5cqqRBMsmGGNZw6uVFiKpjv0B766qE,1783
11
- anemone/indices/index_manager/node_exploration_manager.py,sha256=tcXDgaA7Kne62eOa-RCBTlLx-EYXT-2uTgo0IBNGEbM,21492
11
+ anemone/indices/index_manager/node_exploration_manager.py,sha256=07MCL-hJxazffOGPDbDkpdR0PHvtSRudbazrl2jzYdQ,21372
12
12
  anemone/indices/node_indices/__init__.py,sha256=CHE89gUoI7pPtsnlg5WRUMEiFnFbnLQPy6apu06lVcU,774
13
13
  anemone/indices/node_indices/factory.py,sha256=3jQA9Z4RNSD6oX9PlrMppGm7Q0v-CE2zQ2BGjp74Mc0,4045
14
14
  anemone/indices/node_indices/index_data.py,sha256=EFa3gktB-EqCtGEPOH-4hDb8t0G6DrFGCJITr-Jlu20,5418
@@ -17,66 +17,66 @@ anemone/nn/torch_evaluator.py,sha256=cXcaldEI5S8JE1Yy9aNUamVEK3DPsPmBmGeUi9611zU
17
17
  anemone/node_evaluation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  anemone/node_evaluation/node_direct_evaluation/__init__.py,sha256=2_YwJ3oe0KBfIc3Hs-FLz093RLZsTG-VaNmecLceoiY,898
19
19
  anemone/node_evaluation/node_direct_evaluation/factory.py,sha256=lpFmBJkIGAnar5-pQ1vMze9jUFKFchp5Pg2S8eK-ABM,470
20
- anemone/node_evaluation/node_direct_evaluation/node_direct_evaluator.py,sha256=eHrlyDpwOWpa-7eh8jpWb6-aVoLoDhOLcNJubf40obU,6390
20
+ anemone/node_evaluation/node_direct_evaluation/node_direct_evaluator.py,sha256=jM-gkNeaOOXBXS4JNAAVeXJ5K2bAOppQwV7wpTBX1Ck,5787
21
21
  anemone/node_evaluation/node_tree_evaluation/node_minmax_evaluation.py,sha256=npqy9r7ZKHGMJsDhSY7bZZbRvakwoTyABpwQOVTQ-ww,35126
22
22
  anemone/node_evaluation/node_tree_evaluation/node_tree_evaluation.py,sha256=-fiuTO0nWKKiKWAdgFi-L8kKxIjH0A_0yeUKrp4fk34,4260
23
23
  anemone/node_evaluation/node_tree_evaluation/node_tree_evaluation_factory.py,sha256=UY1glqflqMOqOPAHhtuzJ8QhGOp55Y9InqdhCMt9KJ8,1279
24
- anemone/node_factory/__init__.py,sha256=1ijzc7oIpsEMdJQ1jkqfaonhyvPjeyKv0nDe8tCXRAQ,549
25
- anemone/node_factory/algorithm_node_factory.py,sha256=COu6MiSyW-9M6pDZhJFAuWbp1E-HH9etm90VCoR5r0E,3919
26
- anemone/node_factory/base.py,sha256=2utUE5s-KbMtzfyiW3BfzTBnH_Qg4H5Oeosw0ERYJRQ,2132
24
+ anemone/node_factory/__init__.py,sha256=qhbX58hu8-TdFof5zo3ibfPFvF-OWNSgJf3RDMrtyTQ,553
25
+ anemone/node_factory/algorithm_node_factory.py,sha256=eHsyZ6_no8i9ACfZV8VSKefV3kXiQHvdMNEighDn8Lc,3947
26
+ anemone/node_factory/base.py,sha256=t_immiv-BDrPeQTUiOqvZLSlUq0zA2IbnM5Rweqv_n8,2134
27
27
  anemone/node_selector/__init__.py,sha256=DThR5UV-4WZG4PT5Lo0RPv9_P83ixFGfOSFoGihKtuA,1320
28
28
  anemone/node_selector/branch_explorer.py,sha256=3ywYkJe2R1Dg5nhmDXCgyhex85bT39Ql7ifRY--9Z_A,2677
29
- anemone/node_selector/factory.py,sha256=XfTU7M-XiUsxPV3NpGjeiat7Px7Atzk5EMj8D3iV48k,1829
30
- anemone/node_selector/node_selector.py,sha256=olAyA1_at7VkepZ0hI5S-zfmJAJOVk32XnMKnvHMX7w,1182
29
+ anemone/node_selector/factory.py,sha256=KktiVmsMEsStquWcZtAmfEf472DgT9oSA5sP9jfl4gs,1869
30
+ anemone/node_selector/node_selector.py,sha256=KzE5BQpB2nPKJ4V2ZYnS4NYZE1fFmwWK8W9-9QPBuY8,1160
31
31
  anemone/node_selector/node_selector_args.py,sha256=G0mDPXEOF6oYXqt1176srKrRwDoy31wN8gu9Hzy_8ic,555
32
32
  anemone/node_selector/node_selector_types.py,sha256=827M2u8D_yBSdufvV3ufjGtj8r1aw4Xcdb7NXYq_T7M,329
33
33
  anemone/node_selector/notations_and_statics.py,sha256=leB0s6yVGeymMWcbbdO5ViDInChLAgGw59-9Ltc3Urw,2653
34
- anemone/node_selector/opening_instructions.py,sha256=B3ayjIgBjiT-8ZAQVQyYIJH66SBm1DElQoJtwY5h6Xc,8187
34
+ anemone/node_selector/opening_instructions.py,sha256=OPfoTMMRVPPMQLSvFbzrVf_p5DVwZTW4DQMxnE-OgfU,8124
35
35
  anemone/node_selector/recurzipf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
- anemone/node_selector/recurzipf/recur_zipf_base.py,sha256=hdOHAnYQVSlhvuQSGaqHd79j5X8qeJrnzVU_yo8OBCo,5193
36
+ anemone/node_selector/recurzipf/recur_zipf_base.py,sha256=9_khpUjNsxWzR6NBZRUkqiwzFv2x-llAZBE80oJACTs,5207
37
37
  anemone/node_selector/sequool/__init__.py,sha256=k_YXvShw64GNIAWjZqdNPkUsdCMwPI_RSAmv4I2xxuk,485
38
- anemone/node_selector/sequool/factory.py,sha256=jZqgUs9AR1iU1RI4Jc2OiqYsr_kGnnTabk4WterrtNU,3416
39
- anemone/node_selector/sequool/sequool.py,sha256=qLwGDTlgC8SgD5BrUvQTpQ5nkfxwop5ceKDcDoiOLPo,12649
38
+ anemone/node_selector/sequool/factory.py,sha256=owO65DnmiBTR0cuprzfraqvHx5LMg-I_Vcqd55fQwr4,3072
39
+ anemone/node_selector/sequool/sequool.py,sha256=NSGwIQk8KxD-TSzdw2LvFIOPUlNfQX8OOE_zXfoByqc,11531
40
40
  anemone/node_selector/uniform/__init__.py,sha256=fRGC0FL_fnXXeNoj3QeMQmNoESrFfSDaiHp-zHpF_zw,366
41
- anemone/node_selector/uniform/uniform.py,sha256=9nGsG8NRgAKwYH-VBywUEAO6lDsgPRX84HkFzyB49TU,3710
42
- anemone/nodes/__init__.py,sha256=yciGi5-PTnXXyuAtf2WfOAkK3_FsFxskfGLjqzHF0zc,384
43
- anemone/nodes/itree_node.py,sha256=tMmH6fQtXH01DRluyOpRM44n4_1-sndWBKMFsUf-Zt8,3564
44
- anemone/nodes/tree_node.py,sha256=_n1dHgII40gtRBYiHvB5UDgQykSSsfLGSdb5IX-67Yc,8333
45
- anemone/nodes/tree_traversal.py,sha256=du_NuWpRX2Qi-9w2WTeos4lEHHj-lrN3yUbdp9tEA2U,3955
46
- anemone/nodes/utils.py,sha256=KvXQcUcTWx8GvWmhykimgt9m-8WTKoALrnG-3WgNx80,5067
41
+ anemone/node_selector/uniform/uniform.py,sha256=Frxyik7Vx2-vF0CcMWclPqymj7XEl08nILtMv4Wjxj8,3745
42
+ anemone/nodes/__init__.py,sha256=XWTr9wZGGX9XHp-bw3zjKfCVdKnNEgVGL1wFWW-ozzI,393
43
+ anemone/nodes/itree_node.py,sha256=ywQIvF8LIihf-7p8OgzMjfTg6S39GRbY3u1b4Ka4JoM,3536
44
+ anemone/nodes/tree_node.py,sha256=DxsFJw5Y8vromLu-oZL8D5F9aLME4FjI1d8XF9e3Eq8,7728
45
+ anemone/nodes/tree_traversal.py,sha256=sE9as_8-74bIUuAYNhk2MK6VvlrN1Y3mFExff_HGpQ8,3958
46
+ anemone/nodes/utils.py,sha256=_NPGFnjzouFMpepyNPw5D0d3999_F3tmJHa0bafwo7M,4501
47
47
  anemone/nodes/algorithm_node/__init__.py,sha256=8cNk3PmDzd22K78YWiO29Mu5A1FCObzPwEfWE1ym6Jk,116
48
- anemone/nodes/algorithm_node/algorithm_node.py,sha256=VgUzzouLWO4Pcx3yglAzngF6sJ5VAf3PyZmsm8-tqRU,6501
48
+ anemone/nodes/algorithm_node/algorithm_node.py,sha256=VzZsLZ0KmRt92me1U_mwATLu_uyVVafTOA-wtugtyms,6517
49
49
  anemone/progress_monitor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- anemone/progress_monitor/progress_monitor.py,sha256=oK0gckMoFqQaOrOwybtW58tcBQz7PqkKV0Lu1V-gXpw,10821
50
+ anemone/progress_monitor/progress_monitor.py,sha256=ExuvwOntZBwrBjIbNr8ZpeCd2F5s21rsX74FFog7gqY,10896
51
51
  anemone/recommender_rule/__init__.py,sha256=9K73T0bkpvHg0IsQc1OW8QgsUhCNYq9ceqPMkwdqE8c,347
52
- anemone/recommender_rule/recommender_rule.py,sha256=w6Y83j_LlnBx0iz25_OGFRZ1VnjlUXKZjlQfIjCRu5s,4594
52
+ anemone/recommender_rule/recommender_rule.py,sha256=Ck34nf3fw6FZOi-1HR_XJpuEggcCTxGoCJE_ueUNVO4,4587
53
53
  anemone/search_factory/__init__.py,sha256=ToU88Fa1lBBdf2AYTJ2PNVwWzi5Hzh-78-WOxClVkN4,619
54
54
  anemone/search_factory/search_factory.py,sha256=vCkxJk4cs6i6jjrTrUAsRBtp38N84j_uhyvpYIODoG4,6757
55
55
  anemone/tree_manager/__init__.py,sha256=D3j8emzRNF1fkPTpNUPsXbqAzMM9SyI3Ty_4Y_b2Tas,962
56
- anemone/tree_manager/algorithm_node_tree_manager.py,sha256=s4Iojk9u1fsNso_wH5xMYxHmGIFneLmQN9As2bfViT4,8811
56
+ anemone/tree_manager/algorithm_node_tree_manager.py,sha256=ekDfS4lfYGP9tNtUGre6DGz0haHi3-MZuUVO-kF0JQU,8801
57
57
  anemone/tree_manager/factory.py,sha256=d10uuf5DtHZ_jKT7Z688Wd3_a7TewwmUywlTeWdUQwc,2679
58
- anemone/tree_manager/tree_expander.py,sha256=qq_8EvRaVpgzqI4W3jvI8VJyOnknYgxQuz8yv_pUVkE,4285
59
- anemone/tree_manager/tree_manager.py,sha256=u-4DsgDxu_7uPUTbWYXYLr9_7NGyPJ25bSYXC2RUc-E,8312
58
+ anemone/tree_manager/tree_expander.py,sha256=LpKFDKsOrW0cq09m11aXQZV82s10iyiizQafRBHQ7ts,4041
59
+ anemone/tree_manager/tree_manager.py,sha256=n0ck4Z-i0WIiRI5RkqrhnYNFD88B9Uw1cU0Xa_q0LAE,8281
60
60
  anemone/trees/__init__.py,sha256=FtX6ZDfZI7JDjv6IAgKRVytJmafL3Vod3RF7L-bDTWc,269
61
- anemone/trees/descendants.py,sha256=KaEyesB1D5Rxpfl-LrH6pcWM0HV5zkv-2_2GQx_bjX0,27429
61
+ anemone/trees/descendants.py,sha256=bq8GrckFsPpteWr68og4a5KA94hYWn-qrDzC6dDfOKw,27249
62
62
  anemone/trees/factory.py,sha256=GIZcojZzxl5VG6lEpxxF9PV8VZnS-c18xWxg0dza0r8,2180
63
- anemone/trees/tree.py,sha256=90ElKy10ev0YRKwyWo0Ck49WA2iqrVQjM44CQdsm8Sg,2201
64
- anemone/trees/tree_visualization.py,sha256=gLWoADmuy9MumNR4KLbeWvz3YBU2-bfYO8tvB_ih9FQ,4736
65
- anemone/updates/__init__.py,sha256=YZsQ8c7RcjC8aHTmty5BiEWfo4_D2GDxZ2_BoyjLJnI,1111
63
+ anemone/trees/tree.py,sha256=VsoW_RsicCm47VZuK4riU_OsdAoFtW_Rjrpitmemalk,1995
64
+ anemone/trees/tree_visualization.py,sha256=i3HNt9T5Wc82CVD0NY6rcwZkcaHCQJx8VAq-zArzanc,4665
65
+ anemone/updates/__init__.py,sha256=9WPDhd8DkAkpe5P9sOE4PrX7IbevFVybBEuv0Hus8UA,1113
66
66
  anemone/updates/algorithm_node_updater.py,sha256=zIoqIRhQNcY5P2JoZ_EM_GB5TrCrWZyrGiMLqEuxStM,5865
67
67
  anemone/updates/factory.py,sha256=OuN6cHp9KwSL9bbIEoaJgikp_gX4tU7AjWKasbgttGE,1207
68
- anemone/updates/index_block.py,sha256=3aVUwcVhwHYm1y2FWGULgMqaw_2FhXDpLue_kbDsLxw,3104
68
+ anemone/updates/index_block.py,sha256=nsUHaSxuwzhA1s3IOMx_DTNIML4pnLqUlB4HFPXbHVI,3122
69
69
  anemone/updates/index_updater.py,sha256=aFxTtVwLfSwl089_4Sxsce8DDD8NERaUOdj_RqyJUSI,3638
70
- anemone/updates/minmax_evaluation_updater.py,sha256=sABx1CzXArtxFXwN1Rkq042qKUDVBphpJ6oO3WUh1OQ,4058
71
- anemone/updates/updates_file.py,sha256=QQRWbYmET2KyWyg_8Qq-WC4jR4FPclWPh7vc01kexdM,10092
72
- anemone/updates/value_block.py,sha256=TSo7RNmlCxrQpjPIKHNRGU9IfzKE3FA5BCptwwOujAs,4667
70
+ anemone/updates/minmax_evaluation_updater.py,sha256=GjOgk5EIfOWAW9oLli34-6qfm078bnIE1PJnTkR6s0A,4073
71
+ anemone/updates/updates_file.py,sha256=e26VOk-PCP-GHJJ0dbS4V0DYeJYwNwCvfUotEIqZ5XU,10094
72
+ anemone/updates/value_block.py,sha256=wRl0z8_d1J4mODOSeGsOh3ICo7DtVK7wfDaJibLhjDQ,4687
73
73
  anemone/utils/comparable.py,sha256=eTD81347Qv1dkGR4rD0ep2tbbBR2Mk_4JXZkkYTxiNw,945
74
74
  anemone/utils/dataclass.py,sha256=X77ilEUTIVUudfISYlm7rq3tptqUwdLBOzLDy-gL6t8,1781
75
- anemone/utils/dict_of_numbered_dict_with_pointer_on_max.py,sha256=vVbMWtQavI23zYJ4AuletvSaHrLDfOgvmNPTGolWjVk,4154
75
+ anemone/utils/dict_of_numbered_dict_with_pointer_on_max.py,sha256=s5Z-O5mBwJUh4Pv0TD531Q73BqHj9djQUXERYUQ2EnE,4128
76
76
  anemone/utils/logger.py,sha256=bJQ8COqdn5obtbi8TuokQHmdHpp57XRksTmfvCLLfyM,2973
77
77
  anemone/utils/my_value_sorted_dict.py,sha256=LbqtpBSCS7VrUTUChWCsi18IKZj65FkTJREqbl-xSVA,619
78
78
  anemone/utils/small_tools.py,sha256=l9dy5Oqvuvg8qQXqJUfyb3uwBHwVGVrKz6WeTHjyLTk,2766
79
- algorhino_anemone-0.1.1.dist-info/METADATA,sha256=KTyN1GWK_byEBRVXThAN4PTgewAYl5Knu4HwZrMTap0,5669
80
- algorhino_anemone-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
81
- algorhino_anemone-0.1.1.dist-info/top_level.txt,sha256=G1vbB-vAevQVde3UZ5X1_Ysy1_6sJDEueHRi2qcDgrY,8
82
- algorhino_anemone-0.1.1.dist-info/RECORD,,
79
+ algorhino_anemone-0.1.2.dist-info/METADATA,sha256=BxqVitC0TFU3tWcoxkf_aSsdefABd1flA9_uYBKkgdM,5677
80
+ algorhino_anemone-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
81
+ algorhino_anemone-0.1.2.dist-info/top_level.txt,sha256=G1vbB-vAevQVde3UZ5X1_Ysy1_6sJDEueHRi2qcDgrY,8
82
+ algorhino_anemone-0.1.2.dist-info/RECORD,,
anemone/factory.py CHANGED
@@ -1,14 +1,5 @@
1
1
  """
2
- This module provides functions for creating a TreeAndValueMoveSelector object.
3
-
4
- The TreeAndValueMoveSelector is a player that uses a tree-based approach to select moves in a game. It evaluates the
5
- game tree using a node evaluator and selects moves based on a set of criteria defined by the node selector. The player
6
- uses a stopping criterion to determine when to stop the search and a recommender rule to recommend a move after
7
- exploration.
8
-
9
- This module also provides functions for creating the necessary components of the TreeAndValueMoveSelector, such as the
10
- node evaluator, node selector, tree factory, and tree manager.
11
-
2
+ Module for creating Tree and Value Branch Selector objects.
12
3
  """
13
4
 
14
5
  from dataclasses import dataclass
@@ -49,7 +40,7 @@ TREE_AND_VALUE_LITERAL_STRING: Literal["TreeAndValue"] = "TreeAndValue"
49
40
  @dataclass
50
41
  class TreeAndValuePlayerArgs:
51
42
  """
52
- Data class for the arguments of a TreeAndValueMoveSelector.
43
+ Dataclass for Tree and Value Player Arguments.
53
44
  """
54
45
 
55
46
  node_selector: node_selector_m.AllNodeSelectorArgs
@@ -149,13 +140,15 @@ def create_tree_and_value_branch_selector_with_tree_eval_factory[StateT: TurnSta
149
140
  index_updater=search_factory.create_node_index_updater(),
150
141
  )
151
142
 
152
- tree_move_selector: TreeAndValueBranchSelector[StateT] = TreeAndValueBranchSelector(
153
- tree_manager=tree_manager,
154
- random_generator=random_generator,
155
- tree_factory=tree_factory,
156
- node_selector_create=search_factory.create_node_selector_factory(),
157
- stopping_criterion_args=args.stopping_criterion,
158
- recommend_move_after_exploration=args.recommender_rule,
159
- queue_progress_player=queue_progress_player,
143
+ tree_branch_selector: TreeAndValueBranchSelector[StateT] = (
144
+ TreeAndValueBranchSelector(
145
+ tree_manager=tree_manager,
146
+ random_generator=random_generator,
147
+ tree_factory=tree_factory,
148
+ node_selector_create=search_factory.create_node_selector_factory(),
149
+ stopping_criterion_args=args.stopping_criterion,
150
+ recommend_branch_after_exploration=args.recommender_rule,
151
+ queue_progress_player=queue_progress_player,
152
+ )
160
153
  )
161
- return tree_move_selector
154
+ return tree_branch_selector
@@ -71,7 +71,7 @@ class NodeExplorationIndexManager(Protocol):
71
71
  Args:
72
72
  child_node (AlgorithmNode): The child node to update.
73
73
  parent_node (AlgorithmNode): The parent node of the child node.
74
- tree (trees.ValueTree): The tree containing the nodes.
74
+ tree (Tree): The tree containing the nodes.
75
75
  child_rank (int): The rank of the child node among its siblings.
76
76
  """
77
77
  ...
@@ -116,7 +116,7 @@ class NullNodeExplorationIndexManager(NodeExplorationIndexManager):
116
116
  Args:
117
117
  child_node (AlgorithmNode): The child node to update.
118
118
  parent_node (AlgorithmNode): The parent node of the child node.
119
- tree (trees.ValueTree): The tree containing the nodes.
119
+ tree (Tree): The tree containing the nodes.
120
120
  child_rank (int): The rank of the child node among its siblings.
121
121
  """
122
122
  raise NotImplementedError("should not be raised")
@@ -164,7 +164,7 @@ class UpdateIndexGlobalMinChange:
164
164
  Args:
165
165
  child_node (AlgorithmNode): The child node to update.
166
166
  parent_node (AlgorithmNode): The parent node of the child node.
167
- tree (trees.ValueTree): The tree containing the nodes.
167
+ tree (Tree): The tree containing the nodes.
168
168
  child_rank (int): The rank of the child node among its siblings.
169
169
  """
170
170
 
@@ -261,7 +261,7 @@ class UpdateIndexZipfFactoredProba:
261
261
  Args:
262
262
  child_node (AlgorithmNode): The child node to update.
263
263
  parent_node (AlgorithmNode): The parent node of the child node.
264
- tree (trees.ValueTree): The tree containing the nodes.
264
+ tree (Tree): The tree containing the nodes.
265
265
  child_rank (int): The rank of the child node among its siblings.
266
266
  """
267
267
  _ = parent_node
@@ -347,7 +347,7 @@ class UpdateIndexLocalMinChange:
347
347
  Args:
348
348
  child_node (AlgorithmNode): The child node to update.
349
349
  parent_node (AlgorithmNode): The parent node of the child node.
350
- tree (trees.ValueTree): The tree containing the nodes.
350
+ tree (Tree): The tree containing the nodes.
351
351
  child_rank (int): The rank of the child node among its siblings.
352
352
  """
353
353
 
@@ -492,10 +492,9 @@ def update_all_indices[NodeT: AlgorithmNode[Any]](
492
492
  # todo how are we sure that the hm comes in order?
493
493
  parent_node: NodeT
494
494
  for parent_node in tree_nodes[tree_depth].values():
495
- # for child_node in parent_node.moves_children.values():
496
- move_rank: int
495
+ branch_rank: int
497
496
  branch: BranchKey
498
- for move_rank, branch in enumerate(
497
+ for branch_rank, branch in enumerate(
499
498
  parent_node.tree_evaluation.branches_sorted_by_value_
500
499
  ):
501
500
  child_node = parent_node.branches_children[branch]
@@ -511,7 +510,7 @@ def update_all_indices[NodeT: AlgorithmNode[Any]](
511
510
  index_manager.update_node_indices(
512
511
  child_node=child_node,
513
512
  tree=tree,
514
- child_rank=move_rank,
513
+ child_rank=branch_rank,
515
514
  parent_node=parent_node,
516
515
  parent_node_exploration_index_data=parent_node.exploration_index_data,
517
516
  child_node_exploration_index_data=child_node.exploration_index_data,
@@ -529,17 +528,17 @@ def print_all_indices[NodeT: AlgorithmNode[Any]](
529
528
  Prints the exploration indices of all nodes in the given tree.
530
529
 
531
530
  Args:
532
- tree (trees.ValueTree): The tree containing the nodes.
531
+ tree (Tree): The tree containing the nodes.
533
532
 
534
533
  Returns:
535
534
  None
536
535
  """
537
536
  tree_nodes: RangedDescendants[NodeT] = tree.descendants
538
537
 
539
- half_move: int
540
- for half_move in tree_nodes:
538
+ tree_depth: TreeDepth
539
+ for tree_depth in tree_nodes:
541
540
  # todo how are we sure that the hm comes in order?
542
- for parent_node in tree_nodes[half_move].values():
541
+ for parent_node in tree_nodes[tree_depth].values():
543
542
  assert isinstance(parent_node, AlgorithmNode)
544
543
  if parent_node.exploration_index_data is not None:
545
544
  print(
@@ -1,22 +1,5 @@
1
1
  """
2
- This module contains the implementation of the NodeEvaluator class, which is responsible for evaluating the value of
3
- nodes in a tree-based move selector.
4
-
5
- The NodeEvaluator class wraps a board evaluator and a syzygy table to provide more complex evaluations of chess
6
- positions. It handles queries for evaluating nodes and manages obvious over events.
7
-
8
- Classes:
9
- - NodeEvaluator: Wrapping node evaluator with syzygy and obvious over event.
10
-
11
- Enums:
12
- - NodeEvaluatorTypes: Types of node evaluators.
13
-
14
- Constants:
15
- - DISCOUNT: Discount factor used in the evaluation.
16
-
17
- Functions:
18
- - None
19
-
2
+ Module for evaluating algorithm nodes directly using a master state evaluator.
20
3
  """
21
4
 
22
5
  from enum import Enum
@@ -116,10 +99,7 @@ class NodeDirectEvaluator[StateT: State = State]:
116
99
  master_state_evaluator: MasterStateEvaluator,
117
100
  ) -> None:
118
101
  """
119
- Initializes a NodeEvaluator object.
120
-
121
- Args:
122
- state_evaluator (MasterStateEvaluator): The state evaluator used to evaluate the chess state.
102
+ Initializes a new instance of the NodeEvaluator class.
123
103
  """
124
104
  self.master_state_evaluator = master_state_evaluator
125
105
 
@@ -1,11 +1,11 @@
1
1
  """
2
- This module provides the node factory classes for creating tree nodes in the move selector algorithm.
2
+ This module provides the node factory classes for creating tree nodes in the branch selector algorithm.
3
3
 
4
4
  The available classes in this module are:
5
5
  - TreeNodeFactory: A base class for creating tree nodes.
6
6
  - Base: A base class for the node factory classes.
7
7
  - create_node_factory: A function for creating a node factory.
8
- - AlgorithmNodeFactory: A node factory class for the move selector algorithm.
8
+ - AlgorithmNodeFactory: A node factory class for the branch selector algorithm.
9
9
  """
10
10
 
11
11
  from .algorithm_node_factory import AlgorithmNodeFactory
@@ -33,7 +33,7 @@ if TYPE_CHECKING:
33
33
  @dataclass
34
34
  class AlgorithmNodeFactory[StateT: State = State]:
35
35
  """
36
- The classe creating Algorithm Nodes
36
+ Factory for building AlgorithmNode instances.
37
37
  """
38
38
 
39
39
  tree_node_factory: TreeNodeFactory[AlgorithmNode[StateT], StateT]
@@ -92,18 +92,18 @@ class AlgorithmNodeFactory[StateT: State = State]:
92
92
  modifications: StateModifications | None,
93
93
  ) -> AlgorithmNode[StateT]:
94
94
  """
95
- Creates an AlgorithmNode object.
95
+ Create an AlgorithmNode object.
96
96
 
97
97
  Args:
98
- branch_from_parent (BranchKey | None): the move that led to the node from the parent node
99
- state: The state object.
100
- tree_depth: The tree depth.
101
- count: The count.
98
+ branch_from_parent: The branch key leading from the parent node.
99
+ state: The state object for the node.
100
+ tree_depth: The depth of the node in the tree.
101
+ count: The node identifier.
102
102
  parent_node: The parent node object.
103
- modifications: The board modifications object.
103
+ modifications: The state modifications object.
104
104
 
105
105
  Returns:
106
- An AlgorithmNode object.
106
+ The created AlgorithmNode.
107
107
 
108
108
  """
109
109
  tree_node: TreeNode[AlgorithmNode[StateT], StateT] = (
@@ -44,17 +44,18 @@ class TreeNodeFactory[T: ITreeNode[Any] = ITreeNode[Any], StateT: State = State]
44
44
  modifications: StateModifications | None = None,
45
45
  ) -> TreeNode[T, StateT]:
46
46
  """
47
- Creates a new TreeNode object.
47
+ Create a new TreeNode object.
48
48
 
49
49
  Args:
50
- board (boards.BoardChi): The current board state.
51
- half_move (int): The half-move count.
52
- count (int): The ID of the new node.
53
- parent_node (ITreeNode | None): The parent node of the new node.
54
- move_from_parent (chess.Move | None): The move that leads to the new node.
50
+ state: The current state for the node.
51
+ tree_depth: The tree depth for the new node.
52
+ count: The ID of the new node.
53
+ parent_node: The parent node of the new node.
54
+ branch_from_parent: The branch key from the parent node.
55
+ modifications: The state modifications, if any.
55
56
 
56
57
  Returns:
57
- TreeNode: The newly created TreeNode object.
58
+ The newly created TreeNode object.
58
59
  """
59
60
 
60
61
  # TreeNode doesn't use modifications (it's a pure data container).
@@ -36,14 +36,16 @@ def create(
36
36
  Creation of a node selector
37
37
  """
38
38
 
39
- node_move_opening_selector: NodeSelector
39
+ node_branch_opening_selector: NodeSelector
40
40
 
41
41
  match args.type:
42
42
  case NodeSelectorType.UNIFORM:
43
- node_move_opening_selector = Uniform(opening_instructor=opening_instructor)
43
+ node_branch_opening_selector = Uniform(
44
+ opening_instructor=opening_instructor
45
+ )
44
46
  case NodeSelectorType.RECUR_ZIPF_BASE:
45
47
  assert isinstance(args, RecurZipfBaseArgs)
46
- node_move_opening_selector = RecurZipfBase(
48
+ node_branch_opening_selector = RecurZipfBase(
47
49
  args=args,
48
50
  random_generator=random_generator,
49
51
  opening_instructor=opening_instructor,
@@ -51,7 +53,7 @@ def create(
51
53
 
52
54
  case NodeSelectorType.SEQUOOL:
53
55
  assert isinstance(args, SequoolArgs)
54
- node_move_opening_selector = create_sequool(
56
+ node_branch_opening_selector = create_sequool(
55
57
  opening_instructor=opening_instructor,
56
58
  random_generator=random_generator,
57
59
  args=args,
@@ -62,4 +64,4 @@ def create(
62
64
  f"node selector construction: can not find {args.type} {args} in file {__name__}"
63
65
  )
64
66
 
65
- return node_move_opening_selector
67
+ return node_branch_opening_selector
@@ -32,13 +32,13 @@ class NodeSelector[NodeT: AlgorithmNode[Any] = AlgorithmNode[Any]](Protocol):
32
32
  latest_tree_expansions: "tree_man.TreeExpansions[NodeT]",
33
33
  ) -> OpeningInstructions[NodeT]:
34
34
  """
35
- Selects a node from the given tree and returns the instructions to move to an open position.
35
+ Selects a node from the given tree and returns the instructions to open a branch.
36
36
 
37
37
  Args:
38
38
  tree: The tree containing the nodes.
39
39
  latest_tree_expansions: The latest expansions of the tree.
40
40
 
41
41
  Returns:
42
- OpeningInstructions: The instructions to move to an open position.
42
+ OpeningInstructions: The instructions to open a branch.
43
43
  """
44
44
  raise NotImplementedError()
@@ -1,5 +1,5 @@
1
1
  """
2
- This module contains classes and functions related to opening instructions in a chess game.
2
+ This module contains classes and functions related to opening instructions in a game tree.
3
3
  """
4
4
 
5
5
  from dataclasses import dataclass
@@ -11,8 +11,8 @@ from valanga import BranchKey
11
11
 
12
12
  from anemone import nodes
13
13
  from anemone.nodes.utils import (
14
+ a_branch_key_sequence_from_root,
14
15
  a_branch_str_sequence_from_root,
15
- a_move_key_sequence_from_root,
16
16
  )
17
17
 
18
18
  type OpeningInstructionKey = tuple[int, BranchKey]
@@ -33,7 +33,7 @@ class OpeningInstruction[NodeT: nodes.ITreeNode[Any] = nodes.ITreeNode[Any]]:
33
33
  """
34
34
  print(
35
35
  f"OpeningInstruction: node_to_open {self.node_to_open.id} at hm {self.node_to_open.tree_depth} {self.node_to_open.state}| "
36
- f"a path from root to node_to_open is {a_move_key_sequence_from_root(self.node_to_open)} {a_branch_str_sequence_from_root(self.node_to_open)}| "
36
+ f"a path from root to node_to_open is {a_branch_key_sequence_from_root(self.node_to_open)} {a_branch_str_sequence_from_root(self.node_to_open)}| "
37
37
  f"self.branch {self.branch} {self.node_to_open.state.branch_name_from_key(self.branch)}"
38
38
  )
39
39
 
@@ -76,7 +76,7 @@ class OpeningInstructions[NodeT: nodes.ITreeNode[Any] = nodes.ITreeNode[Any]]:
76
76
  key: The key for the opening instruction.
77
77
  value: The opening instruction.
78
78
  """
79
- # key is supposed to be a tuple with (node_to_open, move_to_play)
79
+ # key is supposed to be a tuple with (node_to_open, branch)
80
80
  self.batch[key] = value
81
81
 
82
82
  def __getitem__(self, key: OpeningInstructionKey) -> OpeningInstruction[NodeT]:
@@ -177,10 +177,10 @@ def create_instructions_to_open_all_branches[NodeT: nodes.ITreeNode[Any]](
177
177
  branches_to_play: list[BranchKey], node_to_open: NodeT
178
178
  ) -> OpeningInstructions[NodeT]:
179
179
  """
180
- Creates opening instructions for all possible moves to play from a given node.
180
+ Create opening instructions for all possible branches from a given node.
181
181
 
182
182
  Args:
183
- moves_to_play: A list of chess moves.
183
+ branches_to_play: The branch keys to open.
184
184
  node_to_open: The node to open.
185
185
 
186
186
  Returns:
@@ -195,7 +195,6 @@ def create_instructions_to_open_all_branches[NodeT: nodes.ITreeNode[Any]](
195
195
  opening_instructions_batch[(node_to_open.id, branch_to_play)] = (
196
196
  OpeningInstruction(node_to_open=node_to_open, branch=branch_to_play)
197
197
  )
198
- # node_to_open.non_opened_legal_moves.add(move_to_play)
199
198
  return opening_instructions_batch
200
199
 
201
200
 
@@ -233,7 +232,7 @@ class OpeningInstructor:
233
232
  node_to_open: The node to open.
234
233
 
235
234
  Returns:
236
- A list of chess moves.
235
+ A list of branch keys.
237
236
  """
238
237
  if self.opening_type == OpeningType.ALL_CHILDREN:
239
238
  node_to_open.all_branches_generated = True
@@ -242,7 +241,7 @@ class OpeningInstructor:
242
241
  # this shuffling add randomness to the playing style
243
242
  # (it stills depends on the random seed, but if random seed varies then the behavior will be more random)
244
243
  # DEACTIVATED ATM BECAUSE I DO NOT UNDERSTAND or FORGOT THE USE CASE: MAYBE DEAD SINCE SEED SYSTEM CHANGED
245
- # self.random_generator.shuffle(moves_to_play)
244
+ # self.random_generator.shuffle(branches_to_play)
246
245
 
247
246
  else:
248
247
  raise NotImplementedError("Hello-la")
@@ -1,7 +1,7 @@
1
1
  """
2
- This module contains the implementation of the RecurZipfBase class, which is a node selector for a move selector tree.
2
+ This module contains the implementation of the RecurZipfBase class, which is a node selector for a branch selector tree.
3
3
 
4
- The RecurZipfBase class is responsible for selecting the next node to explore in a move selector tree based on the RecurZipf algorithm.
4
+ The RecurZipfBase class is responsible for selecting the next node to explore in a branch selector tree based on the RecurZipf algorithm.
5
5
 
6
6
  Classes:
7
7
  - RecurZipfBase: The RecurZipfBase Node selector.
@@ -32,7 +32,7 @@ class RecurZipfBaseArgs:
32
32
  Arguments for the RecurZipfBase node selector.
33
33
 
34
34
  Attributes:
35
- move_explorer_priority (SamplingPriorities): The priority for move exploration.
35
+ branch_explorer_priority (SamplingPriorities): The priority for branch exploration.
36
36
  """
37
37
 
38
38
  type: Literal[NodeSelectorType.RECUR_ZIPF_BASE]
@@ -71,14 +71,14 @@ class RecurZipfBase[NodeT: AlgorithmNode[Any] = AlgorithmNode[Any]]:
71
71
  latest_tree_expansions: "tree_man.TreeExpansions[NodeT]",
72
72
  ) -> OpeningInstructions[NodeT]:
73
73
  """
74
- Chooses the next node to explore and the move to open.
74
+ Chooses the next node to explore and the branch to open.
75
75
 
76
76
  Args:
77
- - tree (trees.Tree[AlgorithmNode]): The move selector tree.
77
+ - tree (trees.Tree[AlgorithmNode]): The branch selector tree.
78
78
  - latest_tree_expansions (tree_man.TreeExpansions): The latest tree expansions.
79
79
 
80
80
  Returns:
81
- - OpeningInstructions: The instructions for opening the selected move.
81
+ - OpeningInstructions: The instructions for opening the selected branch.
82
82
 
83
83
  """
84
84
  # todo maybe proportions and proportions can be valuesorted dict with smart updates
@@ -31,18 +31,13 @@ from .sequool import (
31
31
  @dataclass
32
32
  class SequoolArgs:
33
33
  """
34
- Arguments for the Sequool node selector.
35
-
36
- Attributes:
37
- recursive_selection_on_all_nodes (bool): Flag indicating whether to perform recursive selection on all nodes.
38
- random_depth_pick (bool): Flag indicating whether to randomly pick a depth for selection.
39
- consider_all_lesser_half_move (bool): Flag indicating whether to consider all lesser half moves.
34
+ Dataclass for Sequool Arguments.
40
35
  """
41
36
 
42
37
  type: Literal[NodeSelectorType.SEQUOOL]
43
38
  recursive_selection_on_all_nodes: bool
44
39
  random_depth_pick: bool
45
- consider_all_lesser_half_move: bool
40
+ consider_all_lesser_tree_depth: bool
46
41
 
47
42
 
48
43
  def create_sequool(
@@ -77,7 +72,7 @@ def create_sequool(
77
72
  consider_nodes_from_all_lesser_tree_depths_in_sub_stree
78
73
  )
79
74
  else:
80
- if args.consider_all_lesser_half_move:
75
+ if args.consider_all_lesser_tree_depth:
81
76
  consider_nodes_from_all_lesser_tree_depths = partial(
82
77
  consider_nodes_from_all_lesser_tree_depths_in_descendants,
83
78
  descendants=all_nodes_not_opened,