Commit Graph
73 Commits
Author SHA1 Message Date
Josh-Heaps 1680d13b05 bug fix 2026-06-13 18:47:31 -06:00
Josh-Heaps a1e2ad9c2d Bug fixes 2026-06-13 18:44:14 -06:00
Josh-Heaps aeef320cb4 auto train 2026-06-13 17:30:09 -06:00
Josh-Heaps d71e485611 New learning strategy 2026-06-13 17:11:07 -06:00
Josh-Heaps acbee436bb Change data location 2026-06-12 19:53:07 -06:00
Josh-Heaps f09ca60315 foo bar 2026-06-12 18:02:09 -06:00
Josh-Heaps 743c395e11 Choose color against cpu 2026-06-12 10:51:26 -06:00
Josh-HeapsandClaude Opus 4.8 6402ef268c Rework the chess page into a chess.com-style layout
Board with player bars and captured trays on the left, a game panel with
move list, status, and action buttons on the right. The page is locked to
the viewport (no scrolling); on phones the panel collapses into a slide-up
menu reachable from a slim status bar. Cache-busts the chess scripts too.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-10 16:58:35 -06:00
Josh-HeapsandClaude Opus 4.8 c92c46e6d4 Render the board from pushed state
Clients now render from the state delivered with each move/update and
drop stale or echoed updates via a ply-version guard, instead of issuing
a full game-state fetch per event. Adds captured-piece trays, a material
advantage badge, a move list, a status line, and the mobile menu toggle.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-10 16:58:22 -06:00
Josh-HeapsandClaude Opus 4.8 e8a3bfe432 Push authoritative game state on every move
The move endpoint now returns the full resulting board state, and the
controller and CPU orchestrator broadcast it (plus captured pieces and a
ply version) over SignalR, so clients render from one payload instead of
re-fetching. Removes the client-driven hub relay.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-10 16:58:11 -06:00
Josh-HeapsandClaude Opus 4.8 be07f7504e Add killer-move ordering and a search benchmark
Killer moves supply the quiet-move ordering the search lacked: ~1.45x faster at depth 8 (up to 1.88x in quiet positions) with identical play. Adds bench.ps1 and test/bench_main.cpp to time the search, with a BENCH_DISABLE_KILLERS compile toggle so the script can measure before/after.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-09 19:01:57 -06:00
Josh-HeapsandClaude Opus 4.8 b651683e63 Add PGN export and a Copy PGN button for finished games
- Record moves in standard algebraic notation (GameState.SanHistory), built at
  move time in ChessService (captures, disambiguation, castling, promotion,
  en passant, and the check/mate suffix)
- Add PgnExporter.ToPgn (seven-tag header + movetext + result) and a
  GET /api/chess/{gameId}/pgn endpoint
- Show a Copy PGN button when a game ends on both the play and watch pages,
  prefetching the PGN so it works during the post-game cleanup window

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-08 19:14:39 -06:00
Josh-HeapsandClaude Opus 4.8 d87cea572f Feed move history and halfmove clock to the engine for repetition detection
- Track HalfmoveClock in GameState/ChessService (reset on captures and pawn moves)
- Emit the real halfmove clock in ToFen and add GameState.RepetitionHistory()
  (prior positions since the last irreversible move) in ChessEngineHelpers
- Pass that history through IChessEngine.GetBestMoveAsync to the native engine;
  Stockfish ignores it

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-08 18:59:10 -06:00
Josh-HeapsandClaude Opus 4.8 5345427e0c Add transposition table, iterative deepening, and repetition-aware search
- Refactor the search to negamax (single side-relative score + alpha/beta window)
- Add a shared, process-wide transposition table: lock-free XOR-verified slots,
  persists across games, with depth-gated and difficulty-capped score reuse so a
  weak bot can't borrow a stronger game's deeper analysis
- Drive the search with iterative deepening, seeding each depth's move ordering
  from the previous one
- Seed prior-position history (Position::seed_history) over a new engine_best_move
  history parameter so the engine detects threefold/50-move draws the FEN can't carry

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-08 18:58:59 -06:00
Josh-Heaps 76b054ee9d More efficient searching 2026-06-08 17:28:04 -06:00
Josh-HeapsandClaude Opus 4.8 2db95cec34 Add spectator watch page, forfeit-on-new-game, CPU self-play, and threefold repetition
- /watch live feed of active games with click-to-fullscreen and per-game back button
- Starting a new game forfeits the in-progress game; opponent is flagged the winner
- Watch CPU vs CPU self-play games; results shown for ~30s before cleanup
- Detect threefold repetition in the C# rules layer and end the game as a draw

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-08 16:21:49 -06:00
Josh-HeapsandClaude Opus 4.8 fc2a2e122b Build libchess_engine.so in CI deploy and pin runner to ubuntu-24.04
Compile the native engine and copy it into Resources/ before publish so it
ships to prod automatically. Runner pinned to ubuntu-24.04 to match the
server's glibc.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-08 14:12:50 -06:00
Josh-Heaps c3280aa6d3 add custom chess engine 2026-06-08 13:58:22 -06:00
Josh-Heaps 52d468a46e Update blog css 2026-03-07 12:26:58 -07:00
Josh-Heaps ea60ee5a4b fix css 2026-03-06 17:15:51 -07:00
Josh-Heaps 99a9474ef7 Add cache invalidation 2026-03-06 17:05:48 -07:00
Josh-HeapsandClaude Opus 4.6 8043eee4cc Replace file-based blog with API-backed service
BlogService now fetches from Media.JoshHeaps.Net API via HttpClient
with in-memory caching (5-min TTL) and stale cache fallback.
Removed Markdig/YamlDotNet dependencies. All page models now async.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-06 15:33:51 -07:00
Josh-Heaps 9969c6e3cf Add cloud storage to projects section of front page 2025-10-22 11:54:48 -06:00
jheaps 34de3c1abc Update href for chess github 2025-10-17 12:57:17 -06:00
jheaps 311d62a719 Update images 2025-10-17 12:48:10 -06:00
jheaps 4217bf3703 Fix headless issue 2025-10-17 12:29:49 -06:00
jheaps fd68ada82e Get fancy wit it 2025-10-17 12:14:37 -06:00
jheaps 7c77cd0e52 Add square numbers and bug fixes 2025-10-17 12:10:08 -06:00
jheaps 93bdb3518a Bug fixes 2025-10-17 11:41:50 -06:00
jheaps 09b408a75b Add demo button for media.joshheaps.net 2025-10-13 10:15:44 -06:00
jheaps 03dd308449 game removal code cleanup 2025-10-03 11:24:02 -06:00
jheaps 54e4f25be7 Styling 2025-10-03 10:45:20 -06:00
jheaps c2622132bc Revert site back to normal, add memory lane 2025-10-03 10:43:15 -06:00
jheaps 9bd7eb283e Remove bad test 2025-10-03 10:42:57 -06:00
jheaps 95b4ae63ea Anniversary page <3 2025-10-02 10:16:05 -06:00
jheaps edab13f8e4 Javascript cleanup 2025-09-25 10:46:24 -06:00
jheaps 3da59f9e93 Fix tests 2025-09-24 14:39:52 -06:00
jheaps 4bc69d1989 UPdate to use config options 2025-09-24 14:23:36 -06:00
jheaps c98a78d642 Use config options 2025-09-24 14:20:13 -06:00
jheaps b6990a30b7 Ignore https errors 2025-09-24 14:15:03 -06:00
jheaps 86888b21d2 stop using headed browsers 2025-09-24 14:11:43 -06:00
jheaps 140fbbfa76 update 2025-09-24 14:08:15 -06:00
jheaps a176e29388 update action 2025-09-24 14:06:03 -06:00
jheaps b425c4d5d6 Add playwright tests with github actions 2025-09-24 13:48:20 -06:00
jheaps b4acdee6e3 Fix auto ip updates 2025-09-19 16:29:44 -06:00
jheaps 10bf9b3d30 Bring debug.js back (I don't remember killing it) 2025-09-19 16:09:47 -06:00
jheaps be0a753945 remove button to show off github actions 2025-09-02 11:18:44 -06:00
jheaps bb0d611b21 aewpoifhjp 2025-09-02 11:14:49 -06:00
jheaps 847f5cc970 Update button sizing 2025-08-29 16:30:18 -06:00
jheaps 75d4ee8f9a Update button text 2025-08-29 16:28:35 -06:00
jheaps d0272adb51 stop running build twice after push 2025-08-29 16:27:37 -06:00
jheaps 1c0e624aef Add particles page 2025-08-11 14:14:10 -06:00
jheaps a603b4287e Move ip update to hosted service 2025-08-04 14:26:45 -06:00
jheaps ae95b15ee6 Revert "Create db and db access. Add json converter for board array. Add tests for json conversion"
This reverts commit 7a532e52e1.
2025-08-04 14:20:08 -06:00
jheaps f4e377c116 Revert "Add db for backup and memory happiness"
This reverts commit 9003d2c4dd.
2025-08-04 14:20:01 -06:00
jheaps 9003d2c4dd Add db for backup and memory happiness 2025-07-05 18:48:30 -06:00
jheaps 7a532e52e1 Create db and db access. Add json converter for board array. Add tests for json conversion 2025-07-04 13:41:48 -06:00
jheaps d799b88403 Add stockfish to chess 2025-07-03 13:20:53 -06:00
jheaps a541127f11 Add start of stockfish client 2025-07-03 09:19:38 -06:00
jheaps 966013bb09 Revert "Add game (it's stupid but it's there)"
This reverts commit cfd8a54259.
2025-07-03 09:17:33 -06:00
jheaps cfd8a54259 Add game (it's stupid but it's there) 2025-05-27 10:40:39 -06:00
jheaps 824a1d6eab Add debug 2025-05-27 10:40:27 -06:00
jheaps ed35a2e86f Add pawn promotion 2025-03-28 10:41:29 -06:00
jheaps 9f6327f5d9 Add cookies and game deletions 2025-03-27 16:15:48 -06:00
jheaps 79a37c911d Update home page 2025-03-27 15:03:21 -06:00
jheaps 0bb3840aa7 Merge conflicts 2025-03-27 13:55:50 -06:00
jheaps fbed5ae789 Add chess (Oh my gosh big commit) 2025-03-27 13:54:07 -06:00
jheaps 2edc40fb99 Fix gmail svg 2024-11-26 08:49:22 -07:00
jheaps 35cb2a22f9 major updates 2024-11-25 12:05:03 -07:00
jheaps e203e1a6b8 add links to project repos 2024-11-25 08:55:09 -07:00
jheaps f296ef8ae1 fix welcome message styling 2024-11-22 15:26:47 -07:00
jheaps 8ae65986d4 Add project files. 2024-11-22 14:06:04 -07:00
jheaps 9ba80839e7 Add .gitattributes and .gitignore. 2024-11-22 14:06:02 -07:00