Giter Site home page Giter Site logo

Comments (2)

yibeili avatar yibeili commented on September 6, 2024 1

had a look at the decorator pattern and the new compositeheuristic class. I wonder in the future, when we add more move ordering method, do we simply add the evaluation score up from all the ordering methods? (i thought it might be more complicated than this...)

if the answer is yes (and if i understand things correctly), i think i see jlo's point and think decorator could work? but seems to me we can also extend to future method by adding to
return mvv_lva + killer_move
i have no idea about the part that behaviour can be changed at runtime, so not sure about it.

from sporkfish.

KYLChiu avatar KYLChiu commented on September 6, 2024

had a look at the decorator pattern and the new compositeheuristic class. I wonder in the future, when we add more move ordering method, do we simply add the evaluation score up from all the ordering methods? (i thought it might be more complicated than this...)

if the answer is yes (and if i understand things correctly), i think i see jlo's point and think decorator could work? but seems to me we can also extend to future method by adding to return mvv_lva + killer_move i have no idea about the part that behaviour can be changed at runtime, so not sure about it.

@yibeili @ccjeremylo

Adding up the evaluate scores is just one way to do it. If you think of a better way - do suggest! The idea is that if we have multiple heuristics that apply to the same move, we get both benefits:

if non_capture:
   score += killer_move(move)
   score += history(move)

Btw I actually don't know how to implement this with decoration. With a naive implementation, suppose you just return whatever the singular function does on top of the previous ones, e.g. composite_score = killer(mvv_lva(move)). Then because killer is conditional on non-captures, suppose we do get a capturing move - do we return 0 directly without going to mvv-lva logic? In the current code, because we aggregate, we get to run both functions.

Anyway, perhaps it could work, but no one's telling me why it improves on the current design! I'm happy for it to change in the future, but if there's no concrete benefit - why do it? It would be nice to see a little POC or code demonstration to see how we plan to do it (if it happens).

from sporkfish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.