; ------------------------------------------------------------------ RAM ; The net2-style evaluator's work area: 8 pages from WORK (a page ; boundary), WORK2NEED bytes from WORK2 (anywhere uncontended), and the ; parts from WORK3, WORK4 and WORK5 (below), which the includer sets. Boards are 64 bytes: a side's points 1 to 24 (0 to 23), bar (24) ; and checkers borne off (25), and at +32 the other side's from its own ; side. NLA equ 8 ; candidates looked at, at most (n2choose.asm) NREPLY equ 1 ; the opponent's replies scored a roll BSIZE equ 26 ; a dense layer's block: tmplend - tmpl (n2net.asm; ; the builders check it) W equ WORK+$000 ; the move generator's board (at a page) ROOT equ WORK+$040 ; the position to play from ROOT2 equ WORK+$080 ; a candidate's position, the opponent on roll TOP2 equ WORK+$0c0 ; a list (below) of the opponent's replies (NREPLY) LOGZ equ WORK+$0d6 ; the 6 logits (16-bit) EVV equ WORK+$0e2 ; the outcomes' weights for the evaluation VW equ WORK+$0e8 ; the outcomes' weights (money; set per score) SPW equ WORK+$0ee ; the chances of the side last evaluated (stats), ; and eq0's and ply1's: of winning, and the extra ; points of gammons won and lost (3 x 2, 8192 for 1) SBEST equ WORK+$0f4 ; ply1: a roll's chances after the play taken (3 x 2) STEPS equ WORK+$100 ; per step of the play being generated: point, hit ; (at a page) GDIE equ WORK+$108 ; the die of each step KEY equ WORK+$10c ; a play's hash NEWSTEPS equ WORK+$110 ; a play's steps: 4 points ($ff after the last), 4 dice WINSTEPS equ WORK+$118 ; a play kept by `hcount` / `hreply` REC equ WORK+$120 ; per step: its transformer rows (a count, then ; address and 1 to add or 0 to take away, 4 at most) VARS equ WORK+$160 ; single variables (below), to VARSEND PAIRS equ WORK+$1e0 ; the pair products (F/2 bytes) EVACC equ WORK+$200 ; the accumulators being evaluated (F 16-bit, in a ; page) ACC2 equ WORK+$280 ; ROOT's, from the opponent's side; then a ; candidate's, from the side on roll at ROOT SC99 equ EVACC ; the filter's best 99 scores (only before ACC2) HSTAMP equ WORK+$300 ; plays of a non-double generated: a stamp, then ; their hash's 4 bytes, a page each WORKEND equ WORK+$800 RESULT equ W ; the chosen play's position RTAB equ WORK2 ; hash values: 51 of 4 bytes BLK equ RTAB+204 ; the dense layer's blocks: NB x BSIZE + 3 blocks equ BLK ; (for the profile) WORK2NEED equ 204+NB*BSIZE+3 WORK2END equ WORK2+WORK2NEED ; and from WORK3, WORK4 and WORK5 (anywhere: little used, they may be in ; contended memory), their sizes WORK3NEED to WORK5NEED: TOPC equ WORK3 ; lists: count, capacity, then 10 bytes each (NLA) P1LIST equ TOPC+40 ; ply1's plays (P1KEEP, n2cube.asm): decide's TOPC is ; idle then (the game's cube rule keeps 40 bytes below) WORK3NEED equ 2+10*NLA H1 equ WORK4 ; the heads' hidden outputs (L1, L2 bytes) H2 equ H1+N2_L1 WORK4NEED equ N2_L1+N2_L2 PART equ WORK5 ; a dense layer's partial sums (16-bit each) WORK5NEED equ 2*(N2_L1|N2_L2) ; (at least the larger layer's outputs) ; Variables: the move generator's GROOT equ VARS+0 ; the board being generated from (2) GCOUNT equ VARS+2 ; plays generated (2) GSP equ VARS+4 ; the stack to leave the search with (2) LEAFFN equ VARS+6 ; the move generator's handler of a play (2) USERFN equ VARS+8 ; the caller's (2) GTARGET equ VARS+10 GMAX equ VARS+11 GEMIT equ VARS+12 GDOUBLE equ VARS+13 GMAXA equ VARS+14 GENID equ VARS+15 ; the move generator's search number DHI equ VARS+16 ; the dice, larger first DLO equ VARS+17 GKEYED equ VARS+18 ; plays hashed GPRUNE equ VARS+19 ; second-order plays repeating the first skipped ; the filter and the steps' rows FSUMC equ VARS+20 ; the filter's sums of W, the mover's view: contact (2) FSUMR equ VARS+22 ; race (2) FS0C equ VARS+24 ; and of the board gen starts from (2 + 2) FS0R equ VARS+26 FHIT equ VARS+28 FFROM equ VARS+29 FDIE equ VARS+30 RECP equ VARS+31 ; (2) GREC equ VARS+33 ; record the steps' transformer rows ; the chooser WIN equ VARS+34 ; a play bearing off the last checker was seen THRON equ VARS+37 ; only the filter's best 99 are scored THR equ VARS+38 ; the 99th best filter score (2) NEED equ VARS+40 ; plays of that score to take EQN equ VARS+41 ; taken so far SCN equ VARS+42 ; SC99's count LSZ equ VARS+43 ; a list's entry size SPENT equ VARS+44 ; the decision's work by the cost model (4) ST equ VARS+48 ; SPENT before the lookahead (4) BL equ VARS+52 ; the budget's two sides (4 + 4) BR equ VARS+56 PSUM equ ST ; ply1: its chances' sums over the rolls (3 x 3; in ; decide's ST, BL and BR) TOTAL equ VARS+60 ; a candidate's sum over the rolls (4) BEST equ VARS+64 ; (4) CJ equ VARS+68 ; the candidate looked at NCAND equ VARS+69 ; candidates BESTI equ VARS+70 RWORST equ VARS+71 ; the opponent's choice so far (2) RCNT equ VARS+73 SCANB equ VARS+74 ; scan: the board's half (2) SCANR equ VARS+76 ; its view SCANFN equ VARS+77 ; (2) ; the evaluation EVON equ VARS+81 ; the side on roll's half of a board (2) EVOTH equ VARS+83 ; the other side's (2) EHEAD equ VARS+85 ; the head's first layer (2) DX equ VARS+87 ; dense: inputs (2) DN equ VARS+89 ; their count DW equ VARS+90 ; the rows (2) DL equ VARS+92 ; outputs DY equ VARS+93 ; where they go (2) DT equ VARS+95 ; their shifts (2) DMODE equ VARS+97 ; 0 hidden (bytes), 1 logits (16-bit) DPASS equ VARS+98 ; passes so far DLASTF equ VARS+99 ; 0 on the last pass DXP equ VARS+100 ; the inputs left: where (2) DBC equ VARS+102 ; how many, and their place (2) DCNT equ VARS+104 ; outputs left DJP equ VARS+105 ; the block ending the pass (2) SPSAVE equ VARS+110 ; (2) NUM equ VARS+112 ; the equity's numerator (3) PJ equ VARS+115 ; pairs: the unit PU equ VARS+116 DEN equ VARS+117 ; the equity's denominator (2) RES equ VARS+119 ; eq0's and ply1's equity (3) VARSEND equ VARS+122 OPPOFF equ 32 PA equ ROOT2 ; (encode.asm's `contact`, not used) PB equ ROOT2+OPPOFF