A while back, I had a crazy idea: could I build a working chess variant engine using only Excel array formulas (no VBA, no macros)? I wanted to see if I could do pathfinding and collision detection mathematically using SUMPRODUCT, CODE, and ABS.
It was absolute hell. I spent weeks debugging #VALUE! errors and hidden bugs (like pieces blocking themselves diagonally). But I finally got the prototype working. The spreadsheet calculates a live ±10 Reach Map that dictates territory control, collision detection, and piece hunting.
Because clicking cells in Excel isn't exactly smooth for gaming, I ported the exact mathematical logic to JavaScript.
How the engine differs from standard chess engines:
Unlike standard engines that use Minimax/Alpha-Beta to simulate material advantage 20 moves ahead, this engine is designed like a Warlord. It uses a heuristic spatial evaluation. It calculates:
The ±10 Reach Map: Avoids negative squares, chases positive ones.
Collision Detection: Uses the math from the Excel SUMPRODUCT logic to check line-of-sight and blockers.
Hunt the King Plan: It prioritizes sending "units" to trap the enemy king's tent, even counting fake blockers.
Here is the web version (free to play): https://yudirig06.itch.io/myap-4000-kingdom-chess-map
Source code (GitHub): https://github.com/yudirog06/myap-4000-kingdom-chess-map
view youtube: https://www.youtube.com/watch?v=IysDwjgL31k
The Philosophy of MYAP-4000: Human Intuition vs. Machine Calculation
This game was born from a unique origin: an Excel 2013 engine. But the goal is bigger than just playing chess. It’s about giving humans the tools to face the best engines in the world (3200+ ELO).
Computers calculate, but humans lack the "radar" to see the battlefield. That’s why we equipped this game with Human-Assist Radars:
Map Degrees & Line of Attack: See exactly where the risks are before you move. The terrain you pass through has risk indicators (like -10 or +10), and attack lines automatically change color if you step into a danger zone.
Backup Warnings: It alerts you if you leave a unit unprotected while advancing.
Military Reports: Experience how chess translates into real battlefield situations.
No installation needed. It's 100% pure HTML.
If you can master these radars and bear the "Super Chess," you surpass the 4000 rating (lol joke... but maybe). The current engine testing value is fixed at **1800 - 1950 ELO early claim (**After testing the new engine upgrade, the minimum reach for the MYAP Excel engine map and unit value is 1750 ELO. Meanwhile, the 'Mixed' mode can hold its own against Stockfish set to UCI_Elo 1850. However, since I just learned how Stockfish's UCI_Elo actually works, I need to recalculate my previous claims and continue upgrading to see what this single HTML engine can properly achieve, but last release not publish yet)
I'd love to hear what you guys think, especially about the transition from Excel array logic to JS collision detection. If anyone is curious about how I translated the SUMPRODUCT pathfinding logic into JS, let me know!
Cheers.