History v0 - v0.13 notes lost v0.131 create setxy with registers size reduced by 100 bytes (20%) v0.14 basic origin/destination check v0.15 print col/rank in same loop 4 digit input, keep "5 digit input" commented piearr can be moved now v0.151 start using miliversions board refreshed after every move. not good. board read from hex matrix v0.152 minor changes moves working with matrix v0.153 variable standardization clear screen included dot replaced by space. piece array translates to any language v0.154b evaluation working v0.155 reverse function, queen value is 9 now. v0.156 move start address to 30000, to leave space for move list in stack priboa is now a function white moves and black moves program split v0.157 create moves list for black working v0.157b reverse board fixed first candidate moves for the pawn v0.158 fix revbo routine pawn move completed nibble branch v0.158 board print ok v0.159 range check (ranchk) simplified white moves right now v0.159b reverse board ok v0.160 square color switch routine removed step back in cleaning screen. no cls used. nicer, but more code needed v0.161 print board colors simplified. using bright instead. v0.162b reverse board for nibbles. v0.163b nib2pie added for OOB control will have to merge with squ2pie later. v0.163c first piece (bishop) counts movements. 2 bishops work. v0.163d bishops (x2), rooks (x2) move count ok v0.163e all pieces (but pawn) count ok v0.163f all pieces count ok, tested with full opening position. v0.164 tiny corrections: strings, BC register set v0.165 ranchk (move range check) reduced back to byte board branch v0.200 back to 12x10 "byte" board v0.200c white moves ready v0.201b reverse board ok v0.202c count black moves ok!! v0.203 initial board generator (genboa) working v0.204/b genboa reduced. not complete v0.205 evaluate board working v0.206 input error routine removed, candidate count correction v0.207c canlis (candidate list) generated v0.208b the monster is moving! genlis (move generation) is not right v0.209b genlis corrected (pawn straight restricted to 1 move forward) v0.300 MURDOCK complete v0.301d cell concept removal, except for OOB v0.302 iso-functional to MURDOCK, but no cells used v0.303b genlis vectorized, working ok. wont return control v0.304 everything working. ready for shrinking v0.305, b, c shrunk version <700 bytes v0.306c optimized + revbo (785B, 39B debug) v0.306d revbo (773B, 39B debug) v0.306e swicol proc. removed, cp 0 = or A (760B, 44B debug) v0.306f pie2chr removed (741B, 44B debug) v0.307 colored cessboard branch, abandoned v0.308 piece array simplified (733B, 44B bebug) v0.308b pripie inizialization simplified (730B, 44B debug) v0.309b JP -> JR (718B - 46B debug = 672B) v0.310 if debmod implemented (720B - 44B debug = 676B) v0.311 all white move check reworked (712B - 44B = 668B) v0.400 PHOENIX complete. revbo fixed. fully operational v0.401 waikey only debug (675B - 10B = 665B) v0.402b piece array reduced for 1-ply (671 - 10B = 661B) v0.402c pawn straight move fixed v0.403 vectors modified(663B - 10B = 653B) v0.404b vectors corrected, legmo-legad reworked (623B - 10B = 613B) v0.404c (634B - 25B = 609B) v0.404d (635B - 25B = 610B) v0.404f squ2x88 removed. migration to x88 completed (617B - 25B = 592B) v0.404g random move selection (600B - 25B = 575B) v0.405 squ2pie removed, (599B - 25B = 574B) v0.406 main loop implemented, single piemov (589B - 25B = 564B) v0.407 genlis in main loop (584B - 25B = 559B) v0.408 x88wri improved (583B - 25B = 558B) v0.409b single board access: boapi (578B - 25B = 553B) v0.410 cursor moves branch v0.411 legad improved (574B - 33B debug/calls = 541B) v0.412 boapi call improved (572B - 33B = 539B) v0.413 pripi improved (568B - 33B = 535B) v0.414 inp2x88 improved (567B - 33B = 534B) v0.415 genlo improved. dangerous! (565B - 33B = 532B) v0.416b legmov into main loop v0.416c legmov reworked, legmov ok (558B - 33B = 525B) v0.416d rework nok (561B - 33B = 528B) v0.417 stacked candidates (DEAD branch) v0.418 rework ok (566B - 33B = 533B) v0.419b genlis improved, pawn 2 squares forward (565B - 33B = 532B) v0.420 promotion to queen (592B) v0.421 skip move/switch sides (596B) v0.422 square b5: unmoved introduced (598B) v0.423 pawn 2 squares forward improved (595B) v0.424 attacked squares (605B) v0.424c attacked squared complete (632B) v0.425 1st mult-size version (499B - 4B = 495B // 606B) v0.425b full multi-size version (443B - 4B = 439B // 606B) v0.426b castling detection complete v0.427d all except AI, castling, end game detection and restart (463B/619B) v0.428c first black capture based on material v0.429 basic capture fixed and refixed v0.431b back to squares. same behaviour as 0.427d (490B/ 598B) v0.432b all attacked squares actions commented out (592B) v0.433 print board variant v0.434c pawn 2 forward, OOB check improved (479B/566B) v0.435b input simplification (470B/567B) v0.436b board printing simplification (464B/569B) v0.437 evaluation re-worked, keyboard input reworked (434B/530B) v0.437c inp2squ removed (427B/526B) v0.438 (426B-4B/525B-4B) -4B ---> move priboa to main loop v0.439c migration to 16x8 board (418B/513B) -4B v0.440 bakboa+revboa integrated and into main routine auxstr not booked (403B/501B) -4B v0.441 jps removed (402B/499B) -4B v0.442b basic evaluation reworked (390B/488B) -5B (jp->jr, priboa-> main) v0.443 castling temporarily removed candidate search improved. no need to hop to next column (380B/478B) -5B v0.444 position evaluation including (target-source) value. discarded v0.444c postion evaluation: pawn penalty, captured value, vertival advance (394B/492B) -5B v0.445 priboa simplified for minimal chesskelet, seamov optimized (390B/490B) -5B v0.446 priboa un-minimized (dots back), checkmate detection (400B/496B) -16B (jp->jr, priboa-> main, iniboa removed) v0.447 evaluation target square + center distance (4x4) (400B/492B) -16B v0.448 checkmate simplification for sizmod=0, evaluation corrected (396B/492B) -16B v0.450 checkmate improved for sizmod=2, waikey call removed (392B/488B) -15B (priboa-> main, iniboa removed) v0.452 reverse board reworked, no LDI and stack used (387B/483B) -15B v0.452b reverse board trick (385B/481B) -15B v0.453 cantot reseved bytes removed (383B/479B) -15B v0.454 move list generation reworked (374B/470B) -24B (priboa-> main, iniboa removed, remove 0s definition) v0.456 fully commented version v0.457b set_xy removed (373B/466B) -24B v0.458 priboa removed (370B/463B) -20B (iniboa removed, remove 0s definition) v0.459 priboa improved (369B/462B) -20B v0.460 initial board backup removed for sizmod=0 (359B/462B) -9B (remove 0s def.) v0.461 ret instead of rst 0 for sizmod=0 (359B/462B) -9B? v0.462b alternative stack for candidate list. not shorter. CLOSED v0.463c first attacked squares attempt. CLOSED v0.464d attaked squares completed, including valuation (402B/504B) -9B? v0.466 genlist back into main loop again, attacked backup+clear merged (387B/489B) -9B? v0.473 AI complete (411B/530B) -9B? v0.473b valuation weithing corrected (410B/529B) -9B? Current AI takes ~80B. Possible to implement full 2-ply with that memory? v0.500 Code compatibility to SpectNetIde v0.501 new center weight, much better piece moves v0.501 size0c minimum size, old center weight (335B). CLOSED v0.501 size0d minimum size, new center weight (347B); v0.502d minor corrections, coords moved to next level (487B) v0.503b mostly completed (399B/480B) v0.504 byte 0 tails cleaning (390B/471B) v0.505 new interface options / gameplay options split (gammod=0 does not work) v0.506d canlis optimized (gramod=0, plamod=1, 390B) v0.507b failed attempt to remove bacata/bacopo, it seems the best option so far. CLOSED. v0.508b attack squares marking improved (-2B, 388B) v0.509 side selector improved (whomov) (-2B, 386B) v0.510 reverse board (revboa) improved (-1B, 385B) v0.511 jps replaced with jrs (-1B, 384B) cantot reference removed, unused v0.512 movchk improved (-1B, 383B) v0.513c piece valuation (evatap, evaorp) simplified (-12B, 370B) v0.514 square valuation array moved to right plamod (-6B, 364B) v0.514e Setting HL thought code optimized (-2B, 362B) v0.516 piece weight completed (369B) v0.517 square weight included with gamlev=2 + comments improved (397B) v0.600 full version completed. additional optimization needed. v0.601 keyboard input optimized (-1B, 396B) v0.602b attacked square in genlis optimized, temporary AI simplification (-1B, 395B) v0.603 square wight array shrunk (-2B, 393B) v0.604 print board loop optimized (-1B, 392B) v0.605c legadd finally integrated in genlis, calls removed!!! (-5B, 387B) v0.606 genlis pointer optimization (-1B, 386B) v0.607c square weight array moved, tricky one (-1B, 385B) v0.608b board genration, black pieces through code (-2B), v0.607 improvement removed (+1B), (384B) v0.610 improvements after v0.606 discarded (386B) v0.610b square weight simplified (-6B, 380B) v0.611 genlis black capture race condition fixed (+1, 381B) v0.612c weight evaluation problem fixed, and attacked squares in legadd improved (+2B, 383B) v0.614b everything working but (-2B, 381B) - adeventurous king - extreme piece capture valuation v0.615 adventurous king solved by column evaluation change (0B, 381B) v0.616 evaluation arithmetics compressed (-2B, 379B) v0.700 final beta for release fully commented v0.701 fixes [+ fixed, - pending] (-2B, 377B): + scholar's mate: new aquare weight calculation to avoid it. + IF conditions for different sizes compilation corrected + some old text removed - attacked squared with 2-rank pawn move results in crazy moves. v0.703 The Koelman patch: coding optimization is several areas by Johan Koelman (-11B, 365B) v0.704c rank/col printout routine improved (-1B, 459B full version) CLOSED. v0.707 Improvements (-2B, 363B) + board printout improved - attacked squared with 2-rank pawn move results in crazy moves. v0.708b Improvement (-1B, 362B) + king value changed to 8. checkmate validation simplified v0.709g origin piece attacked developed (+8B, 370B) v0.710b additional comments v0.711b missing line in 0.710b corrected v0.712b additional comments v0.713c Mr. Blinky patch: many optimizations included for small and full versions (-3B, 367B) v0.714b Mr. Blinky, 2nd round of optimizations v0.800c castling introduction and 2-square pawn correction (367B) v0.801d castling corrected, minor corrections and comments v0.802d origin atacked square and opening options revised (+3B, 370B) v0.803b origin square attacked simplified (-7B, 364B) v0.804 different opening options for small (optimized) and full featured versions (-1B, 363B) v0.805 (+3B, 366B) - king under attack fix (4 bytes) - white moves routine optimization v0.806e (-1B, 365B) - king value is now (14=0Dh) to avoid strange capture cases not ending in checkmate. - white pieces color changed to b5 instead of b4 to simplify character pick (-1B). - 2 sqaure pawn move improved (-1B) v0.808 (=, 365B) - legality check (seamov) improved (-2B) v0.809 (-11B, 354B) - king security moved to full verion. No gain in basic games v0.811 (-2B, 352B) - rank valuation optimized, bsaed on Arkannoyed idea. Pending: - simplify small version with a capture system only capturing targets >= than our piece. - make all even values, except for pawn. this may help in specials: 2 square forward and promotion. - king security using a special (like queen) to mark all "rays" as "not movable" if attacked. - proper castling condition for the king (few bytes more).