# Fortran pawn war chess engine

**URL:** <https://fortran-lang.discourse.group/t/fortran-pawn-war-chess-engine/11142>\
**Category:** Uncategorized\
**Created:** [October 1, 2026, 7:51am UTC](https://fortran-lang.discourse.group/t/fortran-pawn-war-chess-engine/11142 "2026-10-01T07:51:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Capinol](https://avatars.discourse-cdn.com/v4/letter/c/ce7236/32.png) [@Capinol](https://fortran-lang.discourse.group/u/Capinol)\
**Post date:** [October 1, 2026, 7:51am UTC](https://fortran-lang.discourse.group/t/fortran-pawn-war-chess-engine/11142/1 "2026-10-01T07:51:31Z")

</div>

Hello it is me again with another fortran chess thingy,

this time its a chess war engine, it only knows about pawns, the main goal of pawn wars is to reach the promotion square with any pawn.

While it does implement UCI, it always plays an illegal move on its winning move, ending the game, so it relies on you playing fair. Its also on lichess under the same name tho im too lazy to host it 24/7.

link: [GitHub - CapinolDev/PIK3CB: Pawn war chess engine · GitHub](https://github.com/CapinolDev/PIK3CB)

It’s also not the best considering I made it in one day, sort of as a challenge

---

<div class="post-metadata">

**Author:** ![loiseaujc](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/loiseaujc/32/4582_2.png) [@loiseaujc](https://fortran-lang.discourse.group/u/loiseaujc)\
**Post date:** [October 1, 2026, 8:19am UTC](https://fortran-lang.discourse.group/t/fortran-pawn-war-chess-engine/11142/2 "2026-10-01T08:19:08Z")

</div>

Cool ! I am actually going through pawn war with my 5 years old, I’ll definitely look into this 🙂

---

<div class="post-metadata">

**Author:** ![Capinol](https://avatars.discourse-cdn.com/v4/letter/c/ce7236/32.png) [@Capinol](https://fortran-lang.discourse.group/u/Capinol)\
**Post date:** [October 1, 2026, 9:32am UTC](https://fortran-lang.discourse.group/t/fortran-pawn-war-chess-engine/11142/3 "2026-10-01T09:32:03Z")

</div>

Thanks! I’m not sure whether the engine plays fully perfect at the base depth of 9 - in the repo its compiled with gfortran with no optimization flags. Heard somewhere that pawn wars are fully solved when using depth 16, so I may try to optimize it a bit (and use ifx with -O3) to get it to a point where on depth 16 its fast

---

<div class="post-metadata">

**Author:** ![loiseaujc](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/loiseaujc/32/4582_2.png) [@loiseaujc](https://fortran-lang.discourse.group/u/loiseaujc)\
**Post date:** [October 1, 2026, 10:04am UTC](https://fortran-lang.discourse.group/t/fortran-pawn-war-chess-engine/11142/4 "2026-10-01T10:04:44Z")

</div>

Well, i guess for a 5 years old, even depth 2 would do \>.\<
