Body: <p>I'm new to the forum, greetings to all. As retired software developper I have some time over to learn game theory and to develop my own chess engine. Since I don't want to copy Stockfish code I'm writing all things for my own.</p>
  <p>Currently i write code in C++/C for endgames for my evaluation function.
  My question:</p>
  <p>In a <strong>King+Pawn v/s King</strong> endgame there is an easy way to check if the game is
  won or draw for the stronger side with a small table of 64x64x8 bytes.</p>
  <p>Now, i devlop code for a <strong>King+Knight+Pawn v/s King</strong> endgame.</p>
  <p>Is there any easy way to compute if this endgame is won or a draw for the
  stronger side <strong>without the use of endgame tablebases?</strong></p>
  <p>If the weaker King can capture the Pawn before the stronger King or Knight
  can defend it, the game will end as a draw.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-08T08:16:00.713Z
Comments.Text: There are also fortress positions such as knight defending pawn on seventh rank and king trapped in front of pawn.
Comments.UserDisplayName: Lucenaposition
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-08T09:06:44.107Z
Comments.Text: @Lucenaposition: And stuff like Kh1 Pb4 Na6 - Kb5. Moreover, Kd6 Nd5 Pd7 - Kd8 and such. But everything else should be won. OP might check against "stalemate or fortress or pawn falls in 3 moves at most".
Comments.UserDisplayName: Hauke Reddmann
Tags: <programming><knight-endgame>
Title: King + Knight + Pawn vs. King
ThreadText: # King + Knight + Pawn vs. King
  
  (Asked by: username_0 on 2024-02-08)
  
  I'm new to the forum, greetings to all. As retired software developper I have some time over to learn game theory and to develop my own chess engine. Since I don't want to copy Stockfish code I'm writing all things for my own.
  
  Currently i write code in C++/C for endgames for my evaluation function.
  My question:
  
  In a **King+Pawn v/s King** endgame there is an easy way to check if the game is
  won or draw for the stronger side with a small table of 64x64x8 bytes.
  
  Now, i devlop code for a **King+Knight+Pawn v/s King** endgame.
  
  Is there any easy way to compute if this endgame is won or a draw for the
  stronger side **without the use of endgame tablebases?**
  
  If the weaker King can capture the Pawn before the stronger King or Knight
  can defend it, the game will end as a draw.
  
  **Tags:** programming, knight-endgame
  
  > **Comments:**
  > **username_1**: There are also fortress positions such as knight defending pawn on seventh rank and king trapped in front of pawn.  
  > **username_2**: @username_1: And stuff like Kh1 Pb4 Na6 - Kb5. Moreover, Kd6 Nd5 Pd7 - Kd8 and such. But everything else should be won. OP might check against "stalemate or fortress or pawn falls in 3 moves at most".  
  
  ---
  
  ## 0 answers
  
  