Code Monkey home page Code Monkey logo

Comments (1)

fsmosca avatar fsmosca commented on June 12, 2024

If the side to move of the current position sacrifices a piece,
Example:

  1. A non-capture move to a square where it can be attacked by lower piece value say Rb7 and black would reply Nxb7
  2. A queen captures a pawn or knight or bishop and then that queen is captured by opponent's pawn, knight, bishop or rook.

If such situation is seen by examining the main line of the game under analysis, search this position with time extension and capture the pv of the engine. Walk the pv line say up to 6 or more plies, and check the material balance at the end of the pv walk, if the material is in favor of the opponent but the search score of the engine is equal or in favor of the player that sacrifices material, then this can be considered as one player sacrifices material and a comment can be added to the move like, White sacrifices material !! or With compensation of the sacrificed material.

Another method to detect the side to move has sacrificed material is by examining the move history of the game forward. Say 12. Rb7 Nxb7 {If black is now ahead in material and search score showed in favor to white or slightly in favor to white} 13 aaa bbb 14 aaa1 bbb1 15 aaa2 bbb2 16. aaa3 with black to play and black is still ahead in material at move 16, it is possible that the move 12. Rb7 is a sacrifice.

from chess-artist.

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.