Closed KYLChiu closed 4 months ago
I'll clean these up - mainly the design is so convoluted because I need them for SMP.
_Originally posted by @KYLChiu in #97 (comment)_
Current situation:
- Stats are not propagated to engine/tests, making it difficult to do any analysis.
- Stats are not well designed, it only contains nodes visited and no other information. Moreover it's convoluted - we have to pass in a dictionary and mutate it due to lazy SMP - we can't spawn a process agnostic object from within the class.
Requirements or points of discussion:
- Add visited type of nodes, ie differentiate between quiescence and negamax nodes, plus node properties like cutoff or returned by transposition table.
- Make this retrievable from engine and/or tests, which can form the basis of branching factor analysis in future.
- Let's have the Statistics class stats data structure(s) for now? Lazy SMP issue for later.
sorry, what is SMP? @KYLChiu
Lazy Symmetric Multiprocessing
Discussed offline:
self.nodes_visited
protected, and add getter methodsself._statistics.increment()
should be aware of what types of nodes visitedGeneral comments - the statistics class would become very specific to negamax after our change, for now we just keep it as a negamax specific statistics class
@property
for getting statistics
Tests:
_Originally posted by @KYLChiu in https://github.com/KYLChiu/sporkfish/pull/97#discussion_r1473485325_
Current situation:
Stats are not propagated to engine/tests, making it difficult to do any analysis.
Stats are not well designed, it only contains nodes visited and no other information. Moreover it's convoluted - we have to pass in a dictionary and mutate it due to lazy SMP - we can't spawn a process agnostic object from within the class.
Requirements or points of discussion:
Add visited type of nodes, ie differentiate between quiescence and negamax nodes, plus node properties like cutoff or returned by transposition table.
Make this retrievable from engine and/or tests, which can form the basis of branching factor analysis in future.
Let's have the Statistics class owns data structure(s) for now? Lazy SMP issue for later.