Code for evaluation getting complicated easily. I wonder if using a composite design pattern wouldn't be best.
https://en.wikipedia.org/wiki/Composite_pattern
[Actually I've bad experience with some design patterns because of making it slow or even more complicated]
Evaluation as a composite
Moderators: hgm, Rebel, chrisw
-
- Posts: 7220
- Joined: Mon May 27, 2013 10:31 am
Re: Evaluation as a composite
It is more complicated than that. For evaluator is a strategy and a state of search(er) as well. For instance evaluator should change it's behavior when in end game
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Evaluation as a composite
Don't waste your time with this object oriented crap. If you cannot write it simply, in procedural form, then you don't understand what you're doing, and making it object oriented and using fancy design pattern won't help. On the contrary, it makes things harder, because you end up having to solve problems that weren't there to begin with, but emerged as a result of your spaghetti web of object oriented patterns.Henk wrote:Code for evaluation getting complicated easily. I wonder if using a composite design pattern wouldn't be best.
https://en.wikipedia.org/wiki/Composite_pattern
[Actually I've bad experience with some design patterns because of making it slow or even more complicated]
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
-
- Posts: 7220
- Joined: Mon May 27, 2013 10:31 am
Re: Evaluation as a composite
Some are even using a (neural) network for evaluation. Black box nobody understands.
-
- Posts: 2488
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: Evaluation as a composite
On the upside, one can ponder the whole day about faux problems like "is-a vs. has-a", jiggle around object hierarchies and architect stuff like object model abstract controller manager factories (any permutation or even combination will do).lucasart wrote:Don't waste your time with this object oriented crap.
-
- Posts: 411
- Joined: Thu Dec 30, 2010 4:48 am
Re: Evaluation as a composite
While I'm probably going to regret replying to this...
The main issue is you're taking a solution and going looking for a problem. What do you find unmanageable about your current evaluation and how does this address it to make it more manageable? Nothing about a tree structure with a variety of node types that need to be handled almost the same but slightly differently screams evaluation to me.
The main issue is you're taking a solution and going looking for a problem. What do you find unmanageable about your current evaluation and how does this address it to make it more manageable? Nothing about a tree structure with a variety of node types that need to be handled almost the same but slightly differently screams evaluation to me.
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Evaluation as a composite
Clearly you have no clue what you're doing… You're confusing the faux problems (syntactic bullshit like OOP and design patterns) with the method of resolution of the actual problem (how to evaluate chess position).Henk wrote:Some are even using a (neural) network for evaluation. Black box nobody understands.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
Re: Evaluation as a composite
That doesn't matter: as long as he's having fun all is good.lucasart wrote:Clearly you have no clue what you're doing… You're confusing the faux problems (syntactic bullshit like OOP and design patterns) with the method of resolution of the actual problem (how to evaluate chess position).Henk wrote:Some are even using a (neural) network for evaluation. Black box nobody understands.
-
- Posts: 7220
- Joined: Mon May 27, 2013 10:31 am
Re: Evaluation as a composite
By the way does anybody know why Stockfish doesn't use a neural network for it's evaluation.
-
- Posts: 7220
- Joined: Mon May 27, 2013 10:31 am
Re: Evaluation as a composite
Maybe I like small files. When file gets too big my eyes getting tired of searching. Also makes it more difficult when editing.