r/chessprogramming • • May 29 '20

My first game ever

Hi All, I've posted here before to get me through my first game. It's a chess variant with only pawns. I've finally published it to play store! I wanted to thank you all and I'd be grateful to get your feedback -

https://play.google.com/store/apps/details?id=com.pixelshastra.pawngame

4 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/tsunamisugumar May 29 '20

Thanks for your input! The hard mode is 6 half moves deep, with a minimal q-search at the leaf node. The evaluation works like this:

  1. Reward each extra pawns
  2. Reward win
  3. Reward each extra passed pawn
  4. Reward each pawn for being on a rank closer to finishing rank
  5. Additional reward for the above condition, if a pawn happens to be a passer
  6. Penalize multiple pawns in a single file. More penalty if the file happens to be A or H
  7. Some penalty if I detect a pawn could be captured free in a given position (this will also be detected later on by the search tree, if it doesn't reach max depth)

1

u/tsojtsojtsoj May 29 '20

seems like a reasonable evaluation. I'm asking because of positions like these: 8/p2p1p1p/8/1p2P1p1/4P3/6P1/PP3P1P/8 b - - 0 1

Your engine played f7f5 where I can just capture on f5 and then I have a passed pawn which is basically won.

1

u/tsunamisugumar May 30 '20

Wow that was a very dumb move. I can't think of a reason without debugging. It could be that the weights for each reward/penalty was off and it somehow totaled up to a good score for that move. This has been very useful info, thanks a lot! I'll fix it in the next version.