From c49773a0a02fac5370b94ed3e47a9d6b97bbf13f Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Thu, 26 Aug 2021 13:10:48 +0200 Subject: [PATCH] Unsorted files from CLUSRC; \O -IPAK- --- src/as/o/blt.1 | 19 + src/as/o/blt.rel | Bin 0 -> 408 bytes src/as/o/ismov1.midas | 35 + src/as/o/ismov1.rel | Bin 0 -> 587 bytes src/as/o/o.h | 122 ++++ src/as/o/o.maktap | 11 + src/as/o/o.notes | 62 ++ src/as/o/o.old | 221 ++++++ src/as/o/o1.c | 834 ++++++++++++++++++++++ src/as/o/o1.rel | Bin 0 -> 26573 bytes src/as/o/o2.c | 630 +++++++++++++++++ src/as/o/o2.rel | Bin 0 -> 15761 bytes src/as/o/o3.c | 637 +++++++++++++++++ src/as/o/o3.rel | Bin 0 -> 13414 bytes src/as/o/o4.c | 104 +++ src/as/o/o4.rel | Bin 0 -> 2253 bytes src/as/o/o5.c | 196 ++++++ src/as/o/o5.rel | Bin 0 -> 4929 bytes src/as/o/o6.c | 334 +++++++++ src/as/o/o6.rel | Bin 0 -> 9216 bytes src/as/o/o7.c | 2 + src/as/o/o7.rel | Bin 0 -> 3243 bytes src/as/o/o8.c | 429 ++++++++++++ src/as/o/o8.record | 1511 ++++++++++++++++++++++++++++++++++++++++ src/as/o/o8.rel | Bin 0 -> 19595 bytes src/as/o/ob.h | 68 ++ src/as/o/ob1.c | 613 ++++++++++++++++ src/as/o/ob1.rel | Bin 0 -> 13393 bytes src/as/o/ob2.c | 107 +++ src/as/o/ob2.rel | Bin 0 -> 2399 bytes src/as/o/ob3.c | 2 + src/as/o/ob3.rel | Bin 0 -> 3244 bytes src/as/o/obk.code | 151 ++++ src/as/o/obktst.c | 191 +++++ src/as/o/obktst.rel | Bin 0 -> 6454 bytes src/as/o/obktst.stinkr | 12 + src/as/o/oprint.c | 167 +++++ src/as/o/oprint.rel | Bin 0 -> 5289 bytes src/as/o/oprint.stinkr | 10 + src/as/o/ostat.c | 577 +++++++++++++++ src/as/o/oxgp.c | 508 ++++++++++++++ src/as/o/random.1 | 30 + src/as/o/random.rel | Bin 0 -> 531 bytes src/as/o/stdio.c | 69 ++ src/as/o/stdio.rel | Bin 0 -> 2234 bytes src/as/o/test.book | 10 + 46 files changed, 7662 insertions(+) create mode 100644 src/as/o/blt.1 create mode 100644 src/as/o/blt.rel create mode 100644 src/as/o/ismov1.midas create mode 100644 src/as/o/ismov1.rel create mode 100644 src/as/o/o.h create mode 100644 src/as/o/o.maktap create mode 100644 src/as/o/o.notes create mode 100644 src/as/o/o.old create mode 100644 src/as/o/o1.c create mode 100644 src/as/o/o1.rel create mode 100644 src/as/o/o2.c create mode 100644 src/as/o/o2.rel create mode 100644 src/as/o/o3.c create mode 100644 src/as/o/o3.rel create mode 100644 src/as/o/o4.c create mode 100644 src/as/o/o4.rel create mode 100644 src/as/o/o5.c create mode 100644 src/as/o/o5.rel create mode 100644 src/as/o/o6.c create mode 100644 src/as/o/o6.rel create mode 100644 src/as/o/o7.c create mode 100644 src/as/o/o7.rel create mode 100644 src/as/o/o8.c create mode 100644 src/as/o/o8.record create mode 100644 src/as/o/o8.rel create mode 100644 src/as/o/ob.h create mode 100644 src/as/o/ob1.c create mode 100644 src/as/o/ob1.rel create mode 100644 src/as/o/ob2.c create mode 100644 src/as/o/ob2.rel create mode 100644 src/as/o/ob3.c create mode 100644 src/as/o/ob3.rel create mode 100644 src/as/o/obk.code create mode 100644 src/as/o/obktst.c create mode 100644 src/as/o/obktst.rel create mode 100644 src/as/o/obktst.stinkr create mode 100644 src/as/o/oprint.c create mode 100644 src/as/o/oprint.rel create mode 100644 src/as/o/oprint.stinkr create mode 100644 src/as/o/ostat.c create mode 100644 src/as/o/oxgp.c create mode 100644 src/as/o/random.1 create mode 100644 src/as/o/random.rel create mode 100644 src/as/o/stdio.c create mode 100644 src/as/o/stdio.rel create mode 100644 src/as/o/test.book diff --git a/src/as/o/blt.1 b/src/as/o/blt.1 new file mode 100644 index 00000000..5e8e9f2f --- /dev/null +++ b/src/as/o/blt.1 @@ -0,0 +1,19 @@ +; +; BLT +; + +RELOCATABLE +TITLE BLT +.INSRT C;NC INSERT +.INSRT C;NM INSERT + +CENTRY BLT,[FROM,TO,NUM] + + HRRZ A,TO + HRRZI B,-1(A) + ADD B,NUM + HRL A,FROM + BLT A,(B) + RETURN + +END diff --git a/src/as/o/blt.rel b/src/as/o/blt.rel new file mode 100644 index 0000000000000000000000000000000000000000..a12daf6f9fef5d3aca3910e0336fab92b1611548 GIT binary patch literal 408 zcmXX@yG{Z@6g@MGECmRKi5oGvVT}cl^-&tZl_(=IXUOtnLC*vZrri=o(~Iv{E|{K&nBviE2ycKR!x<40OT~C zB6d~pdI1cueeMsw>!y?+FUwL6?PvL0$Y+4r3c!o32cA02Cd#nJ^)RZNP2ltK^;QPa z4gpVqMJ~ahd*);197rvkl(Z~1_9EY$bS9iIJW|PTp>#vK;m%}GQ~|NhZH07oqtil3 zEi6QH3;_{lj^+vuTFNcYBh(C@6q+$J8}B>t$Q9nw8v(_puR{bAmD4#r@RN5h?%}ln zGribwU{fO2KhlS!huaUvB@jofT3b!(VZPgr2x+bxa_hL!ZNpAPkNkUD+o3O@`UkH~ BPLKcq literal 0 HcmV?d00001 diff --git a/src/as/o/ismov1.midas b/src/as/o/ismov1.midas new file mode 100644 index 00000000..629a3381 --- /dev/null +++ b/src/as/o/ismov1.midas @@ -0,0 +1,35 @@ +; +; ISMOV1 +; +RELOCATABLE +TITLE ISMOV1 +.INSRT C;NC INSERT +.INSRT C;NM INSERT + +CENTRY ISMOV1,[BB,CC,P1] + +DD==3 +P2==2 +K==5 + + MOVEI DD,ZDIRLI" ; DIRECTION LIST +NXTDIR: MOVE D,(DD) ; NEXT DIRECTION + ADDI DD,1 ; REST OF LIST + JUMPE D,LOSE ; IF NO MORE DIRECTIONS + MOVE P2,P1 ; INITIAL POSITION + SETZ K, ; COUNTER +NXTPOS: ADD P2,D ; MOVE 1 STEP + SKIPG ZSQVAL"(P2) ; STILL ON THE BOARD? + GO NXTDIR ; NO + MOVE A,BB ; THE BOARD + ADDI A,(P2) ; ADDRESS OF SQUARE AT P2 + MOVE A,(A) ; CONTENTS OF SQUARE AT P2 + JUMPE A,NXTDIR ; IT'S EMPTY + CAME A,CC ; IS IT OUR COLOR? + AOJA K,NXTPOS ; NO, COUNT TOKEN AND GO TO NEXT POSITION + JUMPE K,NXTDIR ; DID NOT PASS OVER ANY OPPONENT + MOVEI A,1 ; WIN! +RET: RETURN +LOSE: MOVEI A,0 + GO RET +END diff --git a/src/as/o/ismov1.rel b/src/as/o/ismov1.rel new file mode 100644 index 0000000000000000000000000000000000000000..b01658ce6d1ab4736812024f3aef900ea440ad0e GIT binary patch literal 587 zcmXw1(M}Ul5IwWoc1r-;Xo(d~UAst(B@1fR#9%2+!(x#LRxrHaYK+yype6#^5NSdT zpPVmfx$`H#0jpT!shwn};Sx&=@&<;TXD40Xb-q6E>@Bi1 z5XPV8MH&N%%}csX9m&tT{sdD9(C(+b0zG;Ez|vexi1lq0IH-5v=k@w|H( z1jJIs0__pStz)^14tzr6CQWP3G2hNbvn^>P^NsaytiUue1_A?qd!Qn zbYLyaklhd8kH6PXV0opbk*J-Ox>0jr^G0Q{;745F)&5Zu++M8tC>oYJnEhlfYp%O8 qQSFHu8goxNAoJkFL`|zg)pbKQ{`$(@SA6Hrs{XCFK7Qp-qtp@WIBNm` literal 0 HcmV?d00001 diff --git a/src/as/o/o.h b/src/as/o/o.h new file mode 100644 index 00000000..b7480ac2 --- /dev/null +++ b/src/as/o/o.h @@ -0,0 +1,122 @@ +# ifdef unix +# include +# endif +# define TRUE 1 +# define FALSE 0 + +/* colors */ + +# define EMPTY 0 /* - */ +# define WHITE 1 /* @ */ +# define BLACK 2 /* * */ + +/* commands */ + +# define ANALYZ 'a' +# define PBOARD 'b' +# define HCAP 'h' +# define LISTM 'l' +# define MANUAL 'm' +# define OPTCOM 'o' +# define QUIT 'q' +# define RESIGN 'r' +# define READCM 'B' +# define SCORE 's' +# define TREECM 't' +# define WRITCM 'w' +# define XCOM 'x' +# define HELP '?' +# define SHELL '!' + +/* internal commands */ + +# define ERROR 0 +# define MOVE 'M' +# define DONE 'D' +# define RETRY 'R' + +/* answers */ + +# define YES 'y' +# define NO 'n' + +# ifndef unix +# define fastchar int +# endif +# ifdef unix +# define fastchar char +# endif + +extern fastchar sqval[100], ssqval[100]; +extern int endgame; + +typedef fastchar board[100]; +typedef int position; +typedef int direction; +typedef int color; + +# define oppcolor(c) ((c)^3) +# define bscore(b,c) (b[c]) + +# define ismove(b,c,p) ((b[p] == EMPTY) && ismov1(b,c,p)) + +struct mt { + position p; + int c; + int s; + }; + +# define NORTH (-10) +# define EAST 1 +# define SOUTH 10 +# define WEST (-1) +# define NORTHEAST (-9) +# define NORTHWEST (-11) +# define SOUTHEAST 11 +# define SOUTHWEST 9 + +# define CORNERVALUE 7 +# define EDGEVALUE 6 +# define HEDGEVALUE 5 +# define INTERIORVALUE 4 + +# define CORNERSCORE 30 +# define EDGESCORE 15 +# define POINTSCORE 4 +# define INTERIORSCORE 3 +# define DANGERSCORE 2 + +# define MIDDLEMOVE 27 +# define ENDGAMEMOVE 27 + +# define sqscore(p) (endgame ? 1 : ssqval[p]) + +# define valid(p) (sqval[p]>0) +# define edge(p) (ssqval[p]>=EDGESCORE) +# define corner(p) (sqval[p]>=CORNERVALUE) +# define horizedge(p) ((p)<19||(p)>80) +# define adjedge(p) (sqval[p]==2) +# define adjdiag(p) (sqval[p]==1) +# define adjcorner(p) (sqval[p]<=2) + +# define forallpos(p) for(p=11;p<89;++p) if(valid(p)) +# define nextpos(p,d) (p=+(d)) +# define abs(a) ((a)<0?-(a):(a)) +# define oppdir(d) (-(d)) +# define posx(p) (((p)/10)-1) +# define posy(p) (((p)%10)-1) +# define pos(x,y) ((x)*10+(y)+11) + +# ifndef unix +# define FILE int +# define NULL 0 +# define EOF -1 +# define BUFSIZ 512 +extern int stdin, stdout; +# define fopen flopen +# define time nowtime +# endif + +# ifndef unix +# define cpybrd(a,b) (blt((b),(a),100)) +# endif diff --git a/src/as/o/o.maktap b/src/as/o/o.maktap new file mode 100644 index 00000000..297bf224 --- /dev/null +++ b/src/as/o/o.maktap @@ -0,0 +1,11 @@ +u +u 9 2 +a o.h +a o1.c +a o2.c +a o3.c +a o4.c +a o5.c +a o6.c + + \ No newline at end of file diff --git a/src/as/o/o.notes b/src/as/o/o.notes new file mode 100644 index 00000000..6276bacb --- /dev/null +++ b/src/as/o/o.notes @@ -0,0 +1,62 @@ +perhaps should count edges against, in order to save edge spaces + for later + +----- + +randomize strategy for confusing humans + +----- + +bug: rates * - @ + * @ - + - @ M * @ * + + for * even though * loses the corner + +----- + +an obscure point: sometimes too eager to run along the edge when + about to lose a corner, e.g. + + - - - + - @ - + @ - * + @ - - + * * - + ? * - really shouldn't take this + @ - - + - - - + +----- + +need an algorithm for determining which corner to give up and when to + play X moves + +----- + +perhaps should rate takeback on edge higher, e.g. X * @ for @ + along the edge is better than a random edge-taking move + when the opponent can also take an edge +really need a better transition analysis so that the program will + prefer to take a super-safe edge even if it is going to + lose a corner anyway; perhaps need a category for super-safe + edge; would need a prevents-losing-corner category + +----- + +this position good for *: - * - @ @ - * - + +----- + +these moves not so bad for *, * not likely to get those anyway: + + - - @ ? ? @ - - + +----- + +these moves are bad for *, they lose the ability to later move in + 2 or 7: + + - - ? @ @ ? - - + + \ No newline at end of file diff --git a/src/as/o/o.old b/src/as/o/o.old new file mode 100644 index 00000000..0c14b92c --- /dev/null +++ b/src/as/o/o.old @@ -0,0 +1,221 @@ + +#define FHOLE 1 +#define FCORNER 2 + +/* + * hole - does the position resulting from a move at P by C contain a + * hole for O? If so, what value square is given up? + * + */ + +hole(b,c,o,p) + board b; + color c, o; + position p; + + {register int h; + if (horizedge (p)) + h = hole1 (b,c,o,p,EAST) | hole1 (b,c,o,p,WEST); + else + h = hole1 (b,c,o,p,NORTH) | hole1 (b,c,o,p,SOUTH); + if (h == (FHOLE+FCORNER)) return (CORNERVALUE); + if (h & FHOLE) return (EDGEVALUE); + return (0); + } + +/* + * [_ X = FCORNER + * [_ c+ o* X = FCORNER -- this seems wrong + * + */ + +hole1(b,c,o,p,d) + board b; + color c, o; + register position p; + direction d; + + {int n, m; + n = 0; + while (b[p] == o) + if (!valid (nextpos (p, d))) return (0); + else ++n; + m = 0; + while (b[p] == c) + if (!valid (nextpos (p, d))) return (0); + else ++m; + if (corner (p)) + {if (b[p] == EMPTY) + {if (n == 0) return (FCORNER); + if (m > 0) return (FCORNER); + } + return (0); + } + while (b[p] == o) if (!valid (nextpos (p, d))) return (0); + if (b[p] == c) return (0); + if (corner (p)) return (0); + n = 0; + while (b[p] == EMPTY) + {++n; + if (!valid (nextpos (p, d))) return (0); + } + if ((n & 1) == 0) return (0); + while (b[p] == o) if (!valid (nextpos (p, d))) return (FHOLE); + if (b[p] != c) return (0); + while (b[p] == c) if (!valid (nextpos (p, d))) return (FHOLE); + if (b[p] == o) return (FHOLE); + if (corner (p)) return (FHOLE+FCORNER); + return (FHOLE); + } + + +takeback(b,c,o,p) + board b; + color c, o; + position p; + + {return (takb1(b,c,o,p,NORTH) || + takb1(b,c,o,p,NORTHEAST) || + takb1(b,c,o,p,EAST) || + takb1(b,c,o,p,SOUTHEAST)); + } + +takb1(b,c,o,p,d) + board b; + color c, o; + position p; + direction d; + + {register int c1, c2; + c1 = takb2(b,c,o,p,d); + c2 = takb2(b,c,o,p,oppdir(d)); + return(c1==o&&c2==EMPTY || c1==EMPTY&&c2==o); + } + +takb2(b,c,o,p,d) + board b; + color c, o; + register position p; + direction d; + + {nextpos (p, d); + if (valid (p)) + {while (b[p] == o) + {nextpos (p, d); + if (!valid (p) || b[p]==EMPTY) return (o); + } + } + while (valid (p) && b[p] == c) nextpos (p, d); + if (!valid (p)) return (c); + return (b[p]); + } + +int trydepth; + +int tryedge (oldb,b,c,o,p,d) /* return score from O's point of view */ + board oldb, b; + color c, o; + position p; + direction d; + + {int s1, s2, rc; + + ++trydepth; + if (eflag) + {putn (trydepth); + printf ("tryedge (%c, %d%d):\n", pcolor[c], + posx(p)+1, posy(p)+1); + } + s1 = try1edge (oldb,b,c,o,p,d); + s2 = try1edge (oldb,b,c,o,p,oppdir(d)); + if (s1 == 0) + {if (s2 == 0) rc = 1; + else rc = -s2; + } + else if (s2 == 0) rc = -s1; + else + {if (s2>s1) s1=s2; + rc = -s1; + } + if (eflag) + {putn (trydepth); + printf ("tryedge (%c, %d%d) = %d\n", pcolor[c], + posx(p)+1, posy(p)+1, rc); + } + --trydepth; + return (rc); + } + +int try1edge (oldb,b,c,o,p,d) /* return score from C's point of view */ + board oldb, b; + color c, o; + position p; + direction d; + + {position p1; + int rc; + + ++trydepth; + if (eflag) + {putn (trydepth); + printf ("try1edge (%c, %d%d, %d):\n", pcolor[c], + posx(p)+1, posy(p)+1, d); + } + + rc = 0; + p1 = p; + while (valid (nextpos (p, d))) + {if (b[p] == EMPTY) + {if (ismove (b,c,p)) + {board a; + cpybrd (a,b); + putmov (a,c,p); + /* if (a[p1]==o) {rc = -1; break;} */ + if (corner(p)) + {if (ismove (oldb,c,p)) rc = 1; + else rc = 2; + break; + } + rc = tryedge (oldb,a,o,c,p,d); + if (rc<0 && !ismove(b,o,p)) + rc = 1; /* C need not move */ + break; + } + if (ismove (b,o,p)) /* C can't move, but O can */ + {rc = -try1edge (oldb,b,o,c,p1,d); + if (rc > 0) rc = 0; /* O need not move */ + break; + } + break; + } + } + if (eflag) + {putn (trydepth); + printf ("try1edge (%c, %d%d, %d) = %d\n", pcolor[c], + posx(p)+1, posy(p)+1, d, rc); + } + --trydepth; + return (rc); + } + +/* + else + {struct mt t[64], *tp[64]; + register struct mt **mp; + register int k; + k = pmvgen (a,o,c,tp,t,movnum>=MIDDLEMOVE); + mp = tp; + while (--k >= 0) + {position q; + register int temp; + q = (*mp++)->p; + temp = -meval(a,o,c,q,-minmove); + if (temp1) options (argv[1]); + if (display) clrscreen (); + prnews (); + } + setrand (); +# ifndef unix + if (debug>0) +# endif + mcolor = WHITE; +# ifndef unix + else mcolor = (rand () & 1 ? WHITE : BLACK); +# endif + manmode = 0; + while (playgame () && (superself || ask(stdin,"Another game") == YES)); +# ifdef unix + if (ask(stdin,"Delete saved game") == YES) + unlink (svgame); +# endif + exit(0); + } + +options (s) + char *s; + + {register fastchar c; + explain = debug = eflag = 0; + while (c = lower (*s++)) switch (c) { + case 'x': if (wizard || explain==0) ++explain; continue; + case 'd': if (wizard) ++debug; continue; + case 'e': if (wizard) ++eflag; continue; + case 'm': if (wizard) mvnhack = !mvnhack; continue; + } + if (debug>0) explain=2; + } + +playgame () + + {board b; + int i; + + settime(); + clrbrd(b); +# ifndef unix + gamefile = copen (gambuf, 'w', "s"); +# endif +# ifdef unix + if (superself) gamefile = fopen (svgame, "a"); + else gamefile = fopen (svgame, "w"); + if (gamefile == NULL) + {printf ("Can't create %s\n", svgame); + return (0); + } +# endif + if (superself) fprintf (gamefile, "----------\n"); + +# ifdef unix + else prgame (gamefile); +# endif + + i = game(b); + if (i != QUIT && i != EOF) + {putc ('\n', gamefile); + prtscr (b, gamefile, FALSE); + putc ('\n', gamefile); + if (n_inhibit == 0) inhibit (); + if (!superself && i != RESIGN) shwscore (b); + if (!manmode) wrstat (b, i==RESIGN); + } + fclose (gamefile); +# ifndef unix + if (i != QUIT && i != EOF) + {if (!superself && !manmode && cntbrd(b,oppcolor(mcolor))>=50 + && handicap==0) + {FILE *f; + f = fopen (recfile, "a"); + if (f != NULL) + {prgame (f); + putc ('\p', f); + fclose (f); + } + } + } +# endif + uninhibit (); +# ifndef unix + if (superself || (movnum > MVNREAL && ask (stdin, "Save game")==YES)) + {FILE *f; + if (superself) f = fopen ("o.game", "a"); + else f = fopen ("ogame", "w"); + if (f == NULL) printf ("Can't open file\n"); + else + {prgame (f); + fclose (f); + } + } +# endif + mcolor = oppcolor (mcolor); + return (i != EOF); + } + +prgame (f) + + {fprintf (f, "%s (", username); + if (manmode) + fprintf (f, "manual"); + else putcolor (oppcolor (mcolor), f); + fprintf (f, ") %s\n", timestring); + fprintf (f, "%s", gambuf); + } + +shwscore (b) + board b; + + {int i; + printf("\n"); + i = prtscr(b,stdout,TRUE); + putchar (' '); + if (i!=0) + {if (!manmode) + {if (i > 0) printf("You won by %d\n",i); + else printf("You lost by %d\n",-i); + } + else + {if (i > 0) printf ("* won by %d\n", i); + else printf ("@ won by %d\n", -i); + } + } + else printf("A draw\n"); + } + +wrstat (b, resigned) + board b; + + {FILE *f; + if (debug) + {wrfstat (b, resigned, stdout); + if (ask(stdin,"Write stat file")==NO) return; + } + if ((f = fopen(log,"a"))!=NULL) + {wrfstat (b, resigned, f); + fclose (f); + } + } + +wrfstat (b, resigned, f) + board b; + FILE *f; + + {if (superself) putc ('O', f); + else fprintf (f, "%s", username); + putc('\t',f); + prtscr(b,f,TRUE); + putc ('\t', f); + putcolor (oppcolor(mcolor), f); + if (resigned) putc ('r', f); + else if (nanalyze>10) putc ('a', f); + fprintf (f, "%d\t%d+%d\t%s", + handicap,fcnt[oppcolor(mcolor)],fcnt[mcolor],timestring); + } + +settime () + + {int tv[2]; + time (tv); + timestring = ctime(tv); + } + +game (b) + board b; + + {handicap = fcnt[BLACK] = fcnt[WHITE] = 0; + endgame = -1000; + setmov (b, 1); + machine[mcolor] = TRUE; + machine[oppcolor(mcolor)] = superself; + player = BLACK; + bk_clear (BLACK); + selfplay = superself; + nanalyze = 0; + if (!superself && machine[player] && display) dpyempty (); + for (;;) + {position p; + int mtime; + mtime = -1; + if (cntbrd(b,EMPTY) == 0) break; + if (!anymvs (b, player)) + {if (!anymvs (b, oppcolor(player))) break; + p = -1; + ++fcnt[player]; + bk_flush (); + if (!machine[player]) + {do_inhibit (); + if (explain) + {prtbrd (b); + printf ("Forfeit. "); + pause (); + } + } + } + else + {if (machine[player]) + {if (explain) + if (explain>1) + {int temp; + temp = debug; + debug = 0; + analyze(b,player,oppcolor(player)); + debug = temp; + } + else auxbrd(b); + mtime = cputm (); + p = my_mov(b,player,oppcolor(player)); + if (mtime) mtime = cputm () - mtime; + else mtime = -1; + } + else + {fastchar c; + p = onemov (b, player); + if (p >= 0) + {do_inhibit (); + if (explain) + {prtbrd (b); + printf ("The only legal move is "); + printf ("%d-%d. ", + posx(p)+1, posy(p)+1); + pause (); + } + } + else + {uninhibit (); + if (player==WHITE) putchar ('\n'); + switch (c = getmov(b,stdin,&p)) { + + case RESIGN: if (ask (stdin, + "You really want to resign") != YES) + continue; + if (movnum <= MVNREAL) return (QUIT); + p = -2; + break; + case QUIT: if (movnum>MVNREAL && ask (stdin, + "Would you rather resign") == YES) + {p = -2; break;} + if (movnum>MVNREAL) return (EOF); + /* penalize quitters */ + case EOF: return (c); + case RETRY: continue; + case MOVE: break; + } + } + } + bk_move (p); + putmov(b,player,p); + } + if (player==BLACK) mprint ("%d. ", movnum); + else mprint ("..."); + if (p == -1) mprint ("Forfeit"); + else if (p == -2) mprint ("Resign"); + else + {mprint("%d-%d", posx(p)+1, posy(p)+1); + if (machine[player] && mtime>=0) + {int ntenths, nsec; + nsec = mtime / 60; + ntenths = mtime % 60; + ntenths = (ntenths+5)/6; + if (ntenths==10) {ntenths=0;++nsec;} + mprint (" (%d.%d)", nsec, ntenths); + } + } + if (player == WHITE) + {mprint ("\n"); + setmov (b, movnum+1); + } + else if (machine[player]) + tyo_flush (); + player = oppcolor (player); + if (p == -2) + {if (player == WHITE) mprint ("\n"); + return (RESIGN); + } + } + if (!superself) shwbrd(b); + return (DONE); + } + +do_inhibit () + + {if (!debug && !eflag && n_inhibit==0 && !manmode) inhibit (); + } + +setmov (b, n) + board b; + + {int nend; + nend = (n >= ENDGAMEMOVE); + movnum = n; + if (nend != endgame) + {endgame = nend; + fixbrd (b); + } + } + +getmov (b, f, pp) + board b; + FILE *f; + position *pp; + + {int pflag; + + pflag = 1; + for (;;) + {int c, p, i; + + if (pflag && !superself) + {if (pflag>1 && display) + {clrscreen (); + redisplay (); + tyoflush(); + } + else if (movnum>=2 || !machine[BLACK]) prtbrd (b); + else shwbrd (b); + } + pflag = 0; + c = command(stdin,&p); + *pp = p; + switch (c) { + +case HELP: printf ("%s", helpmsg); + continue; +case MANUAL: bk_flush (); + machine[BLACK] = machine[WHITE] = 0; + manmode = TRUE; + continue; +case PBOARD: pflag = 2; + continue; +case READCM: bk_flush (); + if (readbd (b, buf)) return (RETRY); + printf ("no file\n"); + continue; +case WRITCM: if (!writbd (b, buf)) printf ("can't\n"); + continue; +case TREECM: dotree (b,player,oppcolor(player),p,stdout); + continue; +case OPTCOM: options (buf); + continue; +case XCOM: explain = !explain; + continue; +case SCORE: i = prtscr(b,stdout,TRUE); + if (!manmode) + {if (i > 0) printf(" You're winning."); + else if (i < 0) printf(" You're losing!"); + } + else + {if (i > 0) printf (" * is winning."); + else if (i < 0) printf (" @ is winning."); + } + putchar('\n'); + continue; +case QUIT: +case RESIGN: +case EOF: return (c); +case HCAP: if (handicap==0 && movnum==1) + {for (i=0; p!=0; ++i) + {b[h[i]] = p>0 ? player : oppcolor(player); + handicap =+ p>0? 1: -1; + p =+ p>0? -1 : 1; + pflag = 1; + } + if (handicap!=0) + {printf ("Warning: this game will not be "); + printf ("counted in the statistics.\n"); + } + } + else printf("Too late!\n"); + continue; +case LISTM: lstmvs (b,player); + continue; +case ANALYZ: printf (" (%d)\n", ++nanalyze); + analyze(b,player,oppcolor(player)); + continue; +case MOVE: if (ismove(b,player,p)) return (c); + printf("Illegal!\n"); + continue; + } + } + } + +prtscr(b,f,reverse) + board b; + FILE *f; + + {register int i, j; + i = cntbrd (b, BLACK); + j = cntbrd (b, WHITE); + if (reverse && machine[BLACK]) + {int temp; + temp = i; + i = j; + j = temp; + } + fprintf(f,"%d-%d",i,j); + return (i-j); + } + +onemov (b,c) + board b; + color c; + + {register position p; + position p1; + int nmoves; + + p1 = -1; + nmoves = 0; + forallpos (p) if (ismove (b,c,p)) + {p1 = p; + if (++nmoves>1) return (-1); + } + return (p1); + } + +analyze(b,c,o) + board b; + color c, o; + + {board a, omb; + register position p; + int omvnhack; + + omvnhack = mvnhack; + if (!machine[c]) mvnhack = 0; + else sethack (b, c); + cpybrd(a,b); + filmvs(b,o,omb); + forallpos (p) if (ismove (b,c,p)) + a[p] = s_move(b,c,o,p,omb); + auxbrd(a); + mvnhack = omvnhack; + } + +lstmvs(b,c) + board b; + color c; + + {board a; + + filmvs(b,c,a); + auxbrd(a); + } + +filmvs(b,c,a) + board b,a; + color c; + + {register position p; + cpybrd(a,b); + forallpos (p) if (ismove (b,c,p)) + a[p] = '?'; + } + +command(f,pp) + FILE *f; + position *pp; + + {fastchar a, c; + char *s; + int x, y; + + for (;;) + {putcolor (player, stdout); + printf (" to move: "); + switch (c = lower (skipbl(f))) { + +#ifdef unix + + case SHELL: unix(); + continue; + +#endif + + case RESIGN: + c = lower (getc (f)); + if (c == '\n') return (RESIGN); + if (c != 'b') goto flush; + a = READCM; + goto rdname; + + case OPTCOM: if (!wizard) goto flush; + a = OPTCOM; + goto rdname; + + case WRITCM: c = lower (getc (f)); + if (c == '\n') goto flushnl; + if (c != 'b') goto flush; + a = WRITCM; + + rdname: s = buf; + c = getc (f); + if (c != '\n') + {if (c != ' ') goto flush; + c = skipbl (f); + while (c != '\n') + {*s++ = c; + c = getc (f); + } + } + *s++ = 0; + return (a); + + case PBOARD: + case SCORE: + case QUIT: + case ANALYZ: + case LISTM: + case MANUAL: + case XCOM: + case HELP: + a = c; + if ((c = skipbl(f)) != '\n') goto flush; + return (a); + case HCAP: if ((a = c = skipbl(f)) == '-') c = getc(f); + if (c < '1' || c > '4' || skipbl(f) != '\n') + goto flush; + *pp = a=='-'? -(c-'0'):(c-'0'); + return (HCAP); + case TREECM: a = c; + c = skipbl(f); + if (c < '1' || c > '9') goto flush; + if (!wizard) goto flush; + *pp = c-'0'; + while (c = skipbl(f)) + {if (c == '\n') return (a); + if (c < '0' || c > '9') goto flush; + *pp = (*pp * 10) + (c - '0'); + } + goto flush; + case EOF: return (c); + default: if (c < '1' || c > '8') goto flush; + x = c - '1'; + c = skipbl(f); + if (c < '1' || c > '8') goto flush; + y = c - '1'; + if ((c = skipbl(f)) == '\n') + {*pp = pos(x,y); + return (MOVE); + } + flush: while (c != '\n' && c != EOF) c = getc(f); + if (c == EOF) return (c); + case '\n': + flushnl: printf ("Huh?\n"); + } + } + } + +skipbl(f) + register FILE *f; + + {register fastchar c; + while ((c = getc(f)) == ' ' || c == '\t'); + return (c); + } + +mprint (f, a, b, c, d, e) + {fprintf (gamefile, f, a, b, c, d, e); + if (!superself) printf (f, a, b, c, d, e); + } + +getuser () + + {char *s; + getpw(getuid(),username); + s = username; + while (*s) if (*s == ':') {*s = 0; break;} else ++s; + if (username[0]==0) exit(255); + s = username; + while (*s) {if (*s == ' ') *s = '_'; ++s;} + setwizard (); + } + +#ifndef unix +#include "c/its.bits" +# include "c/c.defs" +isdisplay () + {extern int cout; + return (istty (cout) && (status (itschan (cout)) & 077) == 2); + } + +setsuper () + + {if (rsuset (UXJNAME) == csto6 ("OO")) ++superself;} + +checkuser () + {while (!validuser ()) + {char nambuf[40]; + int n; + printf ("Enter your user name (6 or fewer letters): "); + gets (nambuf); + n = csto6 (nambuf); + if (n == csto6 ("AS")) n = 0; + c6tos (n, username); + wsuset (UXUNAME, n); + } + } + +validuser () + {int n, loser, guest, foo; + loser = csto6 ("BERN"); + guest = csto6 ("GUEST"); + foo = csto6 ("FOO"); + n = rsuset (UXUNAME); + if (n == 0) return (FALSE); + if ((n | 0777777) == -1) return (FALSE); + if (n == guest || n == foo) return (FALSE); + if (n == loser) + return (ask (stdin, "Is your name really BERN") == YES); + while (n) + {int c; + c = ((n >> 30) & 077); + n = n << 6; + if (c < ('A'-32) || c > ('Z'-32)) return (FALSE); + } + return (TRUE); + } + +setwizard () + {if (stcmp (username, "AS")) wizard=TRUE; + } + +prnews () + + {int f; + f = copen ("c/_oo.news"); + if (f != OPENLOSS) + {int c; + while (c = getc (f)) putchar (c); + putchar ('\n'); + cclose (f); + pause (); + if (display) clrscreen (); + } + } + +pause () + + {tyos ("Type anything... "); + utyi (); + putchar ('\n'); + } + +ask(f,s) + + {while (1) + {tyos (s); + tyos (" (Y or N)? "); + while (1) + {switch (lower (utyi ())) { + case 'y': tyos ("yes\r"); return ('y'); + case EOF: + case 'n': tyos ("no\r"); return ('n'); + case '\014': tyo ('\r'); break; + default: tyo (007); continue; + } + break; + } + } + } + +inhibit () + + {if (++n_inhibit == 1) + {int b[3], ch; + ttyget (ch = tyiopn (), b); + b[2] =| 02000000; + ttyset (ch, b); + } + } + +uninhibit () + + {if (n_inhibit == 0) return; + if (--n_inhibit == 0) + {int b[3], ch; + ttyget (ch = tyiopn (), b); + b[2] =& ~02000000; + ttyset (ch, b); + } + } + +setrand () + {int tv[2], x; + time (tv); + x = tv[1]; + x =^ cputm (); + srand (x); + x = 20; + while (--x >= 0) rand(); + } + +#endif + +#ifdef unix +checkuser () {;} +spctty (c) {;} +stdio () {nice(12);} +lower (c) {if (c>='A' && c<='Z') return (c+32); return (c);} +isdisplay () + {struct {char ispeed,ospeed;int x,y;} ttt; + gtty (1,&ttt); + return (ttt.ospeed >= 11); + } + +setsuper () {;} +setwizard () + {if (username[0] == 's' && + username[1] == 'n') wizard = TRUE; + } + +prnews () {;} + +pause () + + {fastchar c; + printf ("Type NL..."); + while ((c = getchar ()) != '\n' && c != EOF); + } + +ask(f,s) + register FILE *f; + register char *s; + + {fastchar a, c; + printf("%s? ", s); + c = a = skipbl(f); + while (c != '\n' && c != EOF) c = getc(f); + return (lower (a)); + } + +cputm() + + {struct tbuffer { long user,system,childu,childs; } xxx; + int i; + + times(&xxx); i = xxx.user; + return(i); + } + +inhibit () {;} +uninhibit () {;} + +#define SIGINT 2 +#define SIGQIT 3 +unix() + + {int rc, status, unixpid; + if ((unixpid=fork())==0) + {execl("/bin/sh","sh","-t",0); + exit(255); + } + else if (unixpid == -1) return(0); + else {while ((rc = wait(&status)) != unixpid && rc != -1); + return(1); + } + } + +setrand () + {int tv[2]; + time (tv); + srand (tv[1]); + } + +tyo_flush () + {;} + +#endif + \ No newline at end of file diff --git a/src/as/o/o1.rel b/src/as/o/o1.rel new file mode 100644 index 0000000000000000000000000000000000000000..f8534903c48dda5279a05b778995a16d94c94f93 GIT binary patch literal 26573 zcmb7s3v^Z2dFDQkd#+SKx`=y?kU+YCcq1g}{oH5_@13B)k+azr1{V-lk7(sdO#ZQ0o zbJlI^z4UP12ZZaDI)fH;k~*#AXw!t5q;9uTUV89_OC(hEUV5{&mV_O>m+Iemi*=Qy z=5hB5>zYeWZGW(hb<<0ZA54NJ$`<5@Uv7Mnw|>c~{E4Y<;~D4Jk)@BLOGuE616)Rb1-cX&Bl-QUY@89?uKat$0>D3Y^_J*;L}oX@w!IV&BJK3r=#Tl$D@y}%mLBu zNh|WTvQ4ND8hbB(X-^{v{^H(Cf6#mYbv}e_KFnTTZpo?gfZZa0+I#UI-q}U!MvL*} z?gQ{1&p%Oe>}0V@7y3pVp8vingohs3m4btrqpP1_-)~dqS2hNYs)*GlV5 z;W}g57v;MqbXs&cGc@#E-i{63m$wx&$|J)TnnHv_J53q7bo<^zr{;7ALyRLr=;7@x zsck#E1IM&{a_SxSoN0SzeZKubZej!ot|f#aaJTqBe5(V5V1n(DjfnOqCJh^fv4RE> z!T`BD;+ftl>@m^y$i_?i6CL9>u}7orkqw`_MSpx?HhWCT5YmAJ!j$i_$0ke2#?{^8 zeW!-7$J8_-6a06J|JVFt_SljpWCHGP@!wBc&mQGzLMHz17GM0S!yel#Asdc&M+T#I zm_h_$->tj1p6?D~#-JME87n43q=(?ktpx4m`qyh-G|U4$@{+uOZW``M!+ z%`X$wcZ+^+%`W!XktSqf{BF_Y-@e5jm1#mI!(e%UY(JVrk0oq%S9vI3V(?tjq zLi?k^DENpI?E2)?@wN0ox7|eHf!RdS4XFmvv8M8p%iHz6*}P#))D-`6(Ys$+WeNi( z>0kBrnGuOdMA}&Juh4>_vL=Y7V)0}t#>+h3%52iyUe-yuDurs9OM-gD z*`tb=#jKmoQixG~Cy@~0ML(qGjDmiabEJXVle8j==R6i=Aq}g+WLQx(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`;=H>sPkHYWf#W4W*h3Z(rlVE8j(Ar zehGEZgmzI*3s+Jo1&b3allkc3b-jX@)J))X#|i-`+4wsEoKJw+*-$ZzZ7{p*HIwD^jqPGwybPiiYt=z%|0feAY) zIo@GkNRD&E(921Zv1nQOKwc8s@YaL+1hM!Gg*_O~PJ@Rwq78{jkpo zA!qKUA{pf)Vg!|sQUML);!&(+Fb(6*=>5m)aVOI1dtjwuyGx)3m81?r2`}L=8`VQq z+d-vktXQ*%pd2V;ciSP3HXWsALNOx}D@(?ZOV^KT3g?bj4<}wUEzUaR#*zlD#v=_7 za$OVHLCEE$<#dfMtYccYF`zssymcdcM85giCxs8#*%xlwn8dj5HuPAEe2%vf6r8d} z7BW1jmdIl$4W5O%0PC!_f{iSFC0=y8g#0kCuZ(F;+Vxbtv{a~q9|QgIcJy^hQR-Mn zIk4JjiBLAI{So?=tZP82EymIWl$xkXGko=+nTHy!{zlDtM3_D3YMDfnTQzaqDd0CO zMSgthxspVk`!q_};X@trOp9q^2_`QnCzq~g6U!Pf7!Q@~ literal 0 HcmV?d00001 diff --git a/src/as/o/o2.c b/src/as/o/o2.c new file mode 100644 index 00000000..331f8399 --- /dev/null +++ b/src/as/o/o2.c @@ -0,0 +1,630 @@ +#include "o.h" + +extern int eflag; + +/********************************************************************** + + EDGEVAL - Evaluate C's taking the edge square at P? + + * + * Scores: + * + * +4 = win 2 corners + * +2 = win 1 corner + * +1 = no corners taken, moved last + * 0 = each won 1 corner + * + * + +**********************************************************************/ + +int edepth, ddepth; +color ecolor; + +int edgeval (b,c,o,p) + board b; + color c, o; + position p; + + {direction d; + board a; + + ecolor = c; + if (eflag) + {printf ("\n *** edgeval ("); + putcolor (c, stdout); + printf (", "); + putpos (p, stdout); + printf ("):\n"); + } + if (horizedge(p)) d=WEST; else d=NORTH; + cpybrd (a,b); + putmov (a,c,p); + return (-eeval (b,a,o,c,p,d,TRUE)); + } + +int eeval (oldb,b,c,o,p,d,pass_ok) /* return score from C's point of view */ + board oldb, b; + color c, o; + position p; + direction d; + int pass_ok; + + /* + * Pass_ok is set to false when we are evaluating + * the result of O not moving on this edge on the + * previous turn. In this case, C can always not + * move and get 1 point for moving last. + * + */ + + {int s; /* best score for C */ + int t; /* temporary score for C */ + + if (edepth > 4 && c==ecolor) return (1); + ++edepth; + if (eflag) + {putn (edepth); + printf ("eeval ("); + putcolor (c, stdout); + printf (", "); + putdir (d, stdout); + printf ("):\n"); + } + if (pass_ok) s = -100; else s = 1; + t = e1move (oldb, b, c, o, p, d); + if (t>s) s = t; + t = e1move (oldb, b, c, o, p, oppdir(d)); + if (t>s) s = t; + if (pass_ok && edepth < 4) + {t = -eeval (oldb, b, o, c, p, d, FALSE); + if (t>s) s = t; + } + if (s == -100) s = -1; + if (eflag) + {putn (edepth); + printf ("eeval ("); + putcolor (c, stdout); + printf (", "); + putdir (d, stdout); + printf (") = %d\n", s); + } + --edepth; + return (s); + } + +int e1move (oldb,b,c,o,p,d) /* return score from C's point of view */ + board oldb, b; + color c, o; + position p; + direction d; + + {position findempty (); + int rc; + + rc = -100; + ++edepth; + if (eflag) + {putn (edepth); + printf ("e1move ("); + putcolor (c, stdout); + printf (", "); + putdir (d, stdout); + printf (") "); + } + p = findempty (b, p, d); + if (valid (p) && ismove (b, c, p)) + {int s, t; + board a; + cpybrd (a, b); + putmov (a, c, p); + if (eflag) + {printf ("move at "); + putpos (p, stdout); + printf ("\n"); + } + t = 0; + if (corner(p) && !ismove (oldb, c, p)) t = 2; + s = -eeval (oldb,a,o,c,p,d,TRUE); + if (t==0 || s<-1 || s>1) + t =+ s; + /* only count 1 pt. if no corners */ + rc = t; + } + else if (eflag) printf ("no move\n"); + --edepth; + return (rc); + } + +position findempty (b, p, d) + board b; + position p; + direction d; + + {while (valid (nextpos (p, d)) && b[p] != EMPTY); + return (p); + } + +putn (n) + {printf ("%2d", n); + while (--n>=0) {putchar (' '); putchar (' ');} + } + +/********************************************************************** + + DEFEDGE - Does the move at edge P have defensive value? + + (Move has not yet been made.) + + An edge move has defensive value if it prevents the opponent + from capturing along an edge. + + look for: ~o X o+ c+ _ + where the _ is not a bad move (W,X,Y,Z) for O + look for: o c* X c* o + where there is a hole + +**********************************************************************/ + +int defedge (b,c,o,p) + board b; + color c, o; + position p; + + {direction d; + position p1; + int rc; + p1 = p; + if (ddepth>0) return (FALSE); /* avoid useless recursion */ + ++ddepth; + if (horizedge(p)) d=WEST; else d=NORTH; + rc = def1edge (b,c,o,p,d) || + def1edge (b,c,o,p,oppdir(d)) || + def2edge (b,c,o,p,d); + --ddepth; + return (rc); + } + +int def1edge (b,c,o,p,d) + board b; + color c, o; + position p; + direction d; + + {position p1; + direction d1; + d1 = oppdir (d); + p1 = p; + if (valid (nextpos (p1, d1)) && b[p1]==o) return (FALSE); + if (!valid (nextpos (p, d))) return (FALSE); + if (b[p] != o) return (FALSE); + while (b[p] == o) if (!valid (nextpos (p, d))) return (FALSE); + if (b[p] != c) return (FALSE); + while (b[p] == c) if (!valid (nextpos (p, d))) return (FALSE); + if (b[p] != EMPTY) return (FALSE); + return (s_move (b,o,c,p,b) < 'W'); + } + +int def2edge (b,c,o,p,d) + board b; + color c, o; + position p; + direction d; + + {if (!def3edge (b,c,o,p,d)) return (FALSE); + if (!def3edge (b,c,o,p,oppdir(d))) return (FALSE); + while (b[p] != o) if (!valid (nextpos (p, d))) return (FALSE); + return (hole (b,o,c,p)); + } + +int def3edge (b,c,o,p,d) + board b; + color c, o; + position p; + direction d; + + {if (!valid (nextpos (p, d))) return (FALSE); + while (b[p] == c) if (!valid (nextpos (p, d))) return (FALSE); + return (b[p] == o); + } + +/********************************************************************** + + SAFEDGE - Is the move at edge P safe? + + (Move must have been made.) + + An edge move is considered safe if neither of the nearest + empty edge squares can be taken by the opponent and + (if not a corner) have defensive value for the opponent. + + Return TRUE if the move is safe. + +**********************************************************************/ + +int safedge (b,c,o,p) + board b; + color c, o; + position p; + + {direction d; + if (horizedge(p)) d=WEST; else d=NORTH; + return (saf1edge (b,c,o,p,d) && saf1edge (b,c,o,p,oppdir(d))); + } + +int saf1edge (b,c,o,p,d) + board b; + color c, o; + position p; + direction d; + + {p = findempty (b, p, d); + if (valid (p) && ismove (b, o, p)) + return (!(corner(p) || defedge (b, o, c, p))); + else return (TRUE); + } + +#define FHOLE 1 +#define FCORNER 2 + +/* + * hole - does the position resulting from a move at P by C contain a + * hole for O? If so, what value square is given up? + * + * (The move has already been made.) + * + */ + +hole(b,c,o,p) + board b; + color c, o; + position p; + + {register int h; + if (horizedge (p)) + h = hole1 (b,c,o,p,EAST) | hole1 (b,c,o,p,WEST); + else + h = hole1 (b,c,o,p,NORTH) | hole1 (b,c,o,p,SOUTH); + if (h > FHOLE) return (CORNERVALUE); + if (h == FHOLE) return (EDGEVALUE); + return (0); + } + +/* + * case 1: _ c* X c* _ c+ _ + * + * case 2: _ c* X c* o+ _ c+ _ + * o c* X c* o+ _ c+ _ + * + * case 3: _ c* X c* _ o+ c+ _ + * _ c* X c* _ o+ c+ o + * + * case 4: ... c+ o+ c+ + * can be ignored since it will + * be picked up by edgeval + * + * In all cases, inner _ may be any odd number of _s. + * In all cases, outer _ may be [ or ]. + * In all cases, outer _ are the squares given up, + * plus the inner edge square. + * + */ + +hole1(b,c,o,p,d) + board b; + color c, o; + register position p; + direction d; + + {int n_o_left, n_o_right, n_spaces; + position p1; + direction d1; + + p1 = p; + d1 = oppdir (d); + nextpos (p1, d1); + while (valid (p1) && b[p1] == c) nextpos (p1, d1); + + if (!valid (nextpos (p, d))) return (0); + while (b[p] == c) if (!valid (nextpos (p, d))) return (0); + n_o_left = 0; + while (b[p] == o) + {if (!valid (nextpos (p, d))) return (0); + ++n_o_left; + } + if (b[p] != EMPTY) return (0); + n_spaces = 0; + while (b[p] == EMPTY) + {if (!valid (nextpos (p, d))) return (0); + ++n_spaces; + } + if ((n_spaces & 1) == 0) return (0); + n_o_right = 0; + while (b[p] == o) + {if (!valid (nextpos (p, d))) return (0); + ++n_o_right; + } + if (b[p] != c) return (0); + while (b[p] == c) + if (!valid (nextpos (p, d))) break; + if (valid (p1) && b[p1] == o && n_o_left == 0) return (0); + if (valid (p) && b[p] == o && n_o_right == 0) return (0); + if (valid (p) && corner (p)) return (FCORNER); + if (valid (p1) && corner (p1)) return (FCORNER); + return (FHOLE); + } + +/* + * trap1 - look to see if moving on the edge adjacent to a corner + * is safe + * + * bad if: it turns over an opponent's piece on the adjacent diagonal + * bad if: [_ X c* _ o* _ _ + * (unless the last _ is a corner or adjacent to a corner) + * bad if: [_ X c* _ o* _ c* o + * + */ + +trap1 (b, c, o, p) + board b; + color c, o; + position p; + + {direction d, d1; + position p1; + extern fastchar quadrant[]; + + switch (quadrant[p]) { + case 1: d = EAST; d1 = SOUTH; break; + case 2: d = WEST; d1 = SOUTH; break; + case 3: d = EAST; d1 = NORTH; break; + case 4: d = WEST; d1 = NORTH; break; + } + if (!horizedge (p)) + {direction temp; + temp = d; + d = d1; + d1 = temp; + } + p1 = p; + nextpos (p1, d1); + if (b[p1] == o) + {while (b[p1] == o) if (!valid (nextpos (p1, d1))) break; + if (valid (p1) && b[p1] == c) return (TRUE); + } + nextpos (p, d); + while (b[p] == c) if (!valid (nextpos (p, d))) return (FALSE); + if (b[p] != EMPTY) return (FALSE); + if (!valid (nextpos (p, d))) return (FALSE); + while (b[p] == o) if (!valid (nextpos (p, d))) return (TRUE); + if (b[p] != EMPTY) return (TRUE); + if (!valid (nextpos (p, d))) return (FALSE); + if (b[p] == EMPTY) return (sqval[p] == EDGEVALUE); + while (b[p] == c) if (!valid (nextpos (p, d))) return (FALSE); + return (b[p] == o); + } + +/* + * trap2 - look to see if move on edge, which can be taken back, + * is actually safe. Return CORNERVALUE if it results in taking + * a corner, EDGEVALUE if it is otherwise safe, 0 if it is unsafe. + * + * CORNERVALUE if: [_ o+ X c* _ c+ ~o + * CORNERVALUE if: [_ o+ X c* _ o+ c+ + * EDGEVALUE if: _ o+ X c* _ c+ ~o + * EDGEVALUE if: _ o+ X c* _ o+ c+ + * EDGEVALUE if: c+ o+ c+ X _ _ + * EDGEVALUE if: _ o+ _ o+ X _ _ + * + */ + +trap2 (b, c, o, p) + board b; + color c, o; + position p; + + {direction d; + int v; + if (horizedge (p)) d = EAST; + else d = NORTH; + if ((v = trp2a (b, c, o, p, d)) > 0) return (v); + if ((v = trp2a (b, c, o, p, oppdir(d))) > 0) return (v); + if (trp2b (b, c, o, p, d) || trp2b (b, c, o, p, oppdir(d))) + return (EDGEVALUE); + return (0); + } + +trp2a (b, c, o, p, d) + board b; + color c, o; + position p; + direction d; + + {direction od; + position ip; + int v, n; + + ip = p; + od = oppdir(d); + if (!valid (nextpos (p, od))) return (0); + if (b[p] != o) return (0); + while (b[p] == o) if (!valid (nextpos (p, od))) return (0); + if (b[p] != EMPTY) return (0); + if (corner (p)) v = CORNERVALUE; else v = EDGEVALUE; + p = ip; + if (!valid (nextpos (p, d))) return (0); + while (b[p] == c) if (!valid (nextpos (p, d))) return (0); + if (b[p] != EMPTY) return (0); + if (!valid (nextpos (p, d))) return (0); + n = 0; + while (b[p] == o) + if (!valid (nextpos (p, d))) return (0); + else ++n; + if (b[p] != c) return (0); + if (n > 0) return (v); + while (b[p] == c) if (!valid (nextpos (p, d))) return (v); + if (b[p] == EMPTY) return (v); + return (0); + } + +trp2b (b, c, o, p, d) + board b; + color c, o; + position p; + direction d; + + {direction od; + position ip; + + ip = p; + od = oppdir (d); + if (!valid (nextpos (p, od))) return (FALSE); + if (b[p] != EMPTY) return (FALSE); + if (!valid (nextpos (p, od))) return (FALSE); + if (b[p] != EMPTY) return (FALSE); + p = ip; + if (!valid (nextpos (p, d))) return (FALSE); + if (b[p] != c) + {if (b[p] != o) return (FALSE); + while (b[p] == o) if (!valid (nextpos (p, d))) return (FALSE); + if (b[p] != EMPTY) return (FALSE); + if (!valid (nextpos (p, d))) return (FALSE); + if (b[p] != o) return (FALSE); + while (b[p] == o) if (!valid (nextpos (p, d))) return (TRUE); + return (b[p] == EMPTY); + } + while (b[p] == c) if (!valid (nextpos (p, d))) return (FALSE); + if (b[p] != o) return (FALSE); + while (b[p] == o) if (!valid (nextpos (p, d))) return (FALSE); + return (b[p] == c); + } + +/* + * trap3 - look to see if move on edge, which cannot be taken back, + * actually wins the corner + * + * look for: [_ o+ X c* o + * + */ + +trap3 (b, c, o, p) + board b; + color c, o; + position p; + + {direction d; + if (horizedge (p)) d = EAST; + else d = NORTH; + return (trp3a (b, c, o, p, d) || trp3a (b, c, o, p, oppdir(d))); + } + +trp3a (b, c, o, p, d) + board b; + color c, o; + position p; + direction d; + + {direction od; + position ip; + + ip = p; + od = oppdir(d); + if (!valid (nextpos (p, od))) return (FALSE); + if (b[p] != o) return (FALSE); + while (b[p] == o) if (!valid (nextpos (p, od))) return (FALSE); + if (b[p] != EMPTY) return (FALSE); + if (!corner (p)) return (FALSE); + p = ip; + if (!valid (nextpos (p, d))) return (FALSE); + while (b[p] == c) if (!valid (nextpos (p, d))) return (TRUE); + return (b[p] == o); + } + +/* + * trap4 - look to see if move on edge, which creates a hole, + * actually wins the corner + * + * look for: [_ o _ c _ X _ _ + * [_ o _ X _ c _ _ + * + */ + +trap4 (b, c, o, p) + board b; + color c, o; + position p; + + {int x, y; + x = posx (p); + y = posy (p); + if (x == 2) return (trp4a (b, c, o, p, SOUTH)); + if (x == 5) return (trp4a (b, c, o, p, NORTH)); + if (y == 2) return (trp4a (b, c, o, p, EAST)); + if (y == 5) return (trp4a (b, c, o, p, WEST)); + if (x == 3) return (trp4b (b, c, o, p, NORTH)); + if (x == 4) return (trp4b (b, c, o, p, SOUTH)); + if (y == 3) return (trp4b (b, c, o, p, WEST)); + if (y == 4) return (trp4b (b, c, o, p, EAST)); + return (FALSE); + } + +trp4a (b, c, o, p, d) + board b; + color c, o; + position p; + direction d; + + /* look for: [_ o _ c _ X _ _ */ + + {position p1; + + p1 = p; + nextpos (p, d); + if (b[p] != EMPTY) return (FALSE); + nextpos (p, d); + if (b[p] != c) return (FALSE); + nextpos (p, d); + if (b[p] != EMPTY) return (FALSE); + nextpos (p, d); + if (b[p] != o) return (FALSE); + nextpos (p, d); + if (b[p] != EMPTY) return (FALSE); + p = p1; + d = oppdir (d); + nextpos (p, d); + if (b[p] != EMPTY) return (FALSE); + nextpos (p, d); + if (b[p] != EMPTY) return (FALSE); + return (TRUE); + } + +trp4b (b, c, o, p, d) + board b; + color c, o; + position p; + direction d; + + /* look for: [_ o _ X _ c _ _ */ + + {position p1; + + p1 = p; + nextpos (p, d); + if (b[p] != EMPTY) return (FALSE); + nextpos (p, d); + if (b[p] != o) return (FALSE); + nextpos (p, d); + if (b[p] != EMPTY) return (FALSE); + p = p1; + d = oppdir (d); + nextpos (p, d); + if (b[p] != EMPTY) return (FALSE); + nextpos (p, d); + if (b[p] != c) return (FALSE); + nextpos (p, d); + if (b[p] != EMPTY) return (FALSE); + nextpos (p, d); + if (b[p] != EMPTY) return (FALSE); + return (TRUE); + } + \ No newline at end of file diff --git a/src/as/o/o2.rel b/src/as/o/o2.rel new file mode 100644 index 0000000000000000000000000000000000000000..a5e76fc96a3161c6b7d397a151eba773706397ff GIT binary patch literal 15761 zcmb_jdvKK3b-&+p#aO^1t&EU_vT&aj>!gk+C9Y$)ZtFNCXfa42Q(67}&bRyB z-L2foAJvS+`R?PK-}#+$&%NK>CF)v(Pkhw-J(aDLnjD{;oHQa~h~7^Q{^`04f2J*q zwWv7*NW=39q@BFhpN|{RK_uSLb6IF&XuKjXW#gEx$0ZH(oXO%#)yveJ%`uGEJ}CXQi1@k>s7k0i0(;Bg`l``}e&uLMsk>E~E_o#wf(nRADNLHdG!>**CS9() zu3nuS7qZJX(XOX+0D{&(4vwhyD)3tF%B`rG5Qn#_UKzgHTLu$Kerv(|e0XVOA`azxLkJwGb6U>K0 zj6vD;;H#69gnd|W5}fkdVCM#n-5C3Wt>61T(KT|b2uoYapZs3z1ZoN9hBx)nJ^UH# zg=Pl(E_oEC7!Z-*c$!nRT#txJq3d(>$r_{54O(f&=FHjxMt6gy(tw^0lG_>`wdHWt zyoS;h%HP@fF#2C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+mEYREk8O{K<_;3F?7eg7r0n1s zos>=iR640=S-5>0$C2t+2J_>hL zX0I-mPAimCLeFp@K-B6QV*IooWIotsK(~*^oae!425|w0_3!Iz-eE1X`Qf7oUUWRlfjB!>LqyX)5w{B4!XP(Kbstv+7e6*9bc{>j$_k literal 0 HcmV?d00001 diff --git a/src/as/o/o3.c b/src/as/o/o3.c new file mode 100644 index 00000000..89b26400 --- /dev/null +++ b/src/as/o/o3.c @@ -0,0 +1,637 @@ +# include "o.h" + +extern int mvnhack; +extern fastchar quadrant[100]; +int danger; + +/********************************************************************** + + RELSCORE maps two values representing what I get and + what my opponent gets into a letter score. The input + values are: + + 0 - unsafe edge (can be taken back) + 1 - move that may give away corner + 2 - no move + 3 - adjacent to edge + 4 - interior + 5 - hole-making edge + 6 - safe edge + 7 - corner + + note: A = move that wipes out opponent + B = move that saves corner + H = defensive taking of edge + +**********************************************************************/ + +# define GOODSCORE 'H' /* scores worse than this => movnum hack */ +# define BADSCORE 'U' /* scores better than this => movnum hack */ + +fastchar relscore[8][8] { + 'X', 'X', 'X', 'X', 'X', '?', 'X', 'Z', + 'Y', 'Y', 'Y', 'Y', 'Y', '?', 'Y', 'Z', + '?', '?', '?', '?', '?', '?', '?', '?', + 'E', 'E', 'E', 'Q', 'R', '?', 'T', 'Z', + 'E', 'E', 'E', 'P', 'P', '?', 'S', 'Z', + '?', '?', '?', '?', '?', '?', 'V', 'Z', + 'D', 'D', 'D', 'J', 'K', '?', 'N', 'Z', + 'C', 'C', 'C', 'C', 'C', '?', 'F', 'U', + }; + +/********************************************************************** + + MY_MOV - Select a move from the set of best moves. + +**********************************************************************/ + +position my_mov (b,c,o) + board b; + color c, o; + + {struct mt t[64], *tp[64]; + register int k; + + k = bk_lookup (t, tp); + if (k > 0) + {position p; + p = tp[0]->p; + if (k > 1) p = tp[(rand() & 017777) % k]->p; + if (ismove (b,c,p)) return (p); + cprint ("Book returns illegal move.\n"); + } + k = getcandidates (b,c,o,tp,t); + if (k==0) return (0); + if (k==1) return (tp[0]->p); + k = (rand() & 017777) % k; + return (tp[k]->p); + } + +/********************************************************************** + + GETCANDIDATES - Get all best moves. + +**********************************************************************/ + +int getcandidates (b,c,o,tp,t) + board b; + color c, o; + struct mt *tp[], t[]; + + {extern int movnum; + int k, omvnhack; + + omvnhack = mvnhack; + sethack (b, c); + k = igetcandidates (b,c,o,tp,t,movnum>=MIDDLEMOVE); + if (movnum0 && tp[0]->c <= -80) + {mvnhack = 0; + k = igetcandidates (b,c,o,tp,t,'V'); + if (tp[0]->c <= -80) + {k = igetcandidates (b,c,o,tp,t,'X'); + if (tp[0]->c <= -85) + k = igetcandidates (b,c,o,tp,t,1); + } + } + mvnhack = omvnhack; + return (k); + } + +/********************************************************************** + + SETHACK - Determine if we are in danger of being + wiped out. + +**********************************************************************/ + +int sethack (b, c) + board b; + color c; + + {int ccount, ocount; + extern int handicap; + ccount = cntbrd (b, c); + ocount = cntbrd (b, oppcolor(c)); + if (handicap < 0) ccount =+ handicap; + danger = ccount<6; + if (movnum >= MIDDLEMOVE) mvnhack=0; + } + +/********************************************************************** + + IGETBEST - Get best (letterwise) moves + +**********************************************************************/ + +int igetbest (b,c,o,tp,t,tryall) + board b; + color c, o; + struct mt *tp[], t[]; + int tryall; + + {extern int mmdepth; + int k, best; + + mmdepth = 2; + k = pmvgen (b,c,o,tp,t,tryall==1,tryall!=1); + if (k==0) return (0); + best = tp[0]->s; + if (tryall > 1 && best < tryall) k = exprange (tp, t, tryall); + else if (tryall == 0) + {if (best == 'P' && !mvnhack) + {int oldk; + oldk = k; + k = exprange (tp, t, 'S'); + if (k > oldk) ++mmdepth; + } + } + return (k); + } + +/********************************************************************** + + IGETCANDIDATES - Get possible moves. + + tryall == 0: use normal selection + tryall == 1: try all moves + other value: try all moves <= value + +**********************************************************************/ + +int igetcandidates (b,c,o,tp,t,tryall) + board b; + color c, o; + struct mt *tp[], t[]; + int tryall; + + {register int k; + + k = igetbest (b,c,o,tp,t,tryall); + if (k==0) return (0); + if (k==1 && !danger) + {tp[0]->c = -1000; + return (1); + } + return (dosearch (b,c,o,tp,t,k,tryall)); + } + +/********************************************************************** + + DOSEARCH + +**********************************************************************/ + +int dosearch (b,c,o,tp,t,k,tryall) + board b; + color c, o; + struct mt *tp[], t[]; + int tryall; + + {extern int debug, mmdepth, movnum; + register struct mt **bp, **mp, **ep; + int best; + + ep = tp + k; + bp = tp; + mp = tp; + + best = tp[0]->s; + if (mvnhack && !danger && best < 'V' && best != 'B') + {while (mp < ep) + {struct mt *p; + p = *mp++; + p->c = -1000; + } + return (k); + } + + if (best >= 'X') + {mmdepth = 4; + mvnhack = 0; + } + else if (best >= 'V') mmdepth = 3; + if (movnum>=ENDGAMEMOVE) mmdepth = 6; + else if (movnum>=MIDDLEMOVE) + {if (k<=3) mmdepth = 6; + else mmdepth = 4; + } + else if (movnum>=16) + {if (k<=3) mmdepth = 4;} + else if (movnum>=4) + {if (k==2) mmdepth = 4;} + + if (danger && mmdepth<4) mmdepth=4; + + if (debug>0) printf ("\nsearch depth %d\n", mmdepth); + tp[0]->c = -1000; + while (mp < ep) + {struct mt *p; + p = *mp++; + p->c = meval (b,c,o,p->p,tp[0]->c); + if (debug>0) printf (" %d-%d %c %d\n", posx(p->p)+1, + posy(p->p)+1, p->s, p->c); + if (p->c > tp[0]->c) {bp = tp; *bp++ = p;} + else if (p->c == tp[0]->c) *bp++ = p; + } + return (bp-tp); + } + +/********************************************************************** + + EXPRANGE - Return all moves in an already-computed set that + are not worse than a given LETTER score + +**********************************************************************/ + +int exprange (tp,t,letter) + struct mt *tp[], t[]; + + {register struct mt **bp, *mp; + mp = t; + bp = tp; + while (mp->p >= 0) + {if (mp->s <= letter) *bp++ = mp; + ++mp; + } + return (bp-tp); + } + +/********************************************************************** + + PMVGEN - Probable Move Generator + +**********************************************************************/ + +int pmvgen (b,c,o,tp,t,allmoves,wantscores) + board b; + color c,o; + struct mt *tp[],t[]; + + {struct mt *ep; + register struct mt **bp, *mp; + int k; + + k = fillmt(b,c,o,t,wantscores); + if (k==0) return (0); + if (k==1) {tp[0] = t; return (1);} + ep = t+k; + mp = t; + bp = tp; + *bp++ = mp; + while (++mp < ep) + if (allmoves) *bp++ = mp; + else + {if (mp->s < tp[0]->s) {bp = tp; *bp++ = mp;} + else if (mp->s == tp[0]->s) *bp++ = mp; + } + return (bp-tp); + } + +/********************************************************************** + + FILLMT - Legal Move Generator + +**********************************************************************/ + +fillmt(b,c,o,t,wantscores) + board b; + color c, o; + struct mt t[64]; + + {register position p; + register struct mt *tp; + board omb; + + filmvs(b,o,omb); + tp = t; + forallpos (p) if (ismove (b,c,p)) + {tp->p = p; + tp->s = (wantscores ? s_move(b,c,o,p,omb) : 'O'); + ++tp; + } + tp->p = -1; + return (tp-t); + } + +/********************************************************************** + + S_MOVE - Simple Move Evaluator + + OMB is a board where all of O's moves are marked with + a printing character. + +**********************************************************************/ + +s_move(b,c,o,p,omb) + board b, omb; + color c, o; + position p; + + {board a; /* board after move */ + register int myscore, hisscore; + int nmoves, nsaves; + extern int machine[], ddepth; + + cpybrd (a, b); + putmov (a, c, p); + if (bscore (a, o) == 0 && cntbrd (a, o) == 0) return ('A'); + if (debug>0 && ddepth==0) + {printf ("\n"); + putpos (p, stdout); + } + hisscore = aeval (a, p, o, c, omb, &nmoves, &nsaves); + myscore = sqeval (b,c,o,p); + if (ddepth == 0) + {if (debug>0) + {printf (" "); + putcolor (c, stdout); + printf ("=%d ", myscore); + putcolor (o, stdout); + printf ("=%d (", hisscore); + putletter (relscore[myscore][hisscore]); + printf (")"); + } + if (edge (p) && !corner (p)) + {int escore; + escore = edgeval (b, c, o, p); + if (escore > 1) myscore = CORNERVALUE; + else if (escore < -1) hisscore = CORNERVALUE; + else if (escore == 0) myscore = hisscore = CORNERVALUE; + else if (myscore < CORNERVALUE) + {register int temp; + if (escore < 0 && myscore == EDGEVALUE) myscore = 0; + temp = hole (a,c,o,p); + if (temp>0 && trap4 (b, c, o, p)) + myscore = CORNERVALUE; + else + {if (temp>hisscore) hisscore=temp; + if (temp>0 && + (myscore>=HEDGEVALUE || myscore==0)) + myscore = HEDGEVALUE; + } + } + } + } + myscore = relscore[myscore][hisscore]; + if (ddepth == 0) + {if (!corner (p) && edge (p) && + myscore>GOODSCORE && (myscoreGOODSCORE && + (myscore0 && myscore<'Z') myscore='B'; + return (myscore); + } + +/********************************************************************** + + MVNEVAL + +**********************************************************************/ + +int mvneval (myscore, a, c, o, nmoves) + board a; + color c, o; + + {int nmymoves, bias; + if (myscore=='X') bias = 3; else bias = 0; + nmymoves = cntokmoves (a, c); + myscore=(GOODSCORE+10)+nmoves-nmymoves+bias; + if (nmymoves<6) myscore =+ (6-nmymoves)*2; + if (debug>0) + {printf ("; "); + putcolor (c, stdout); + printf ("=%d ", nmymoves); + putcolor (o, stdout); + printf ("=%d sum=%d score=%d", nmoves, + nmoves-nmymoves, myscore - (GOODSCORE+1)); + } + if (myscore>(GOODSCORE+3)) + myscore = (GOODSCORE+3) + (myscore-(GOODSCORE+3))/4; + if (myscore>=BADSCORE) myscore = BADSCORE-1; + else if (myscore<=GOODSCORE) myscore = GOODSCORE+1; + return (myscore); + } + +/********************************************************************** + + AEVAL - Evaluate replies + +**********************************************************************/ + +aeval (b, oldp, c, o, omb, pnmoves, pnsaves) + board b, omb; + position oldp; + color c, o; + int *pnmoves, *pnsaves; + + {register int s; + register position p; + position bestp; + int nmoves, nsaves; + + s = -1; + nmoves = nsaves = 0; + if (debug>0 && ddepth == 0) printf (" ["); + forallpos (p) + {if (ismove (b,c,p)) + {register int temp; + ++nmoves; + if (danger && ddepth==0) + {board a; + cpybrd (a, b); + putmov (a, c, p); + if (bscore (a, o) == 0 && cntbrd (a, o) == 0) + return (CORNERVALUE); + } + temp = sqeval (b,c,o,p); + if (temp > 2 && temp != 5) /* count only good moves */ + {++nmoves; + if (edge (p)) nmoves=+2; /* count edges higher */ + } + if (omb[p] >= ' ') /* can already move there */ + {if (temp>INTERIORVALUE && corner (p) + && !adjedge(oldp)) + temp = INTERIORVALUE; + } + if (debug>1 && ddepth == 0) + {putpos (p, stdout); + printf (":%d ", temp); + } + if (temp>s) {s=temp; bestp = p;} + } + else + {if ((omb[p] >= ' ') && corner(p)) ++nsaves;} + } + *pnmoves = nmoves; + *pnsaves = nsaves; + if (debug>0 && ddepth == 0) + {if (s<0) printf ("no reply"); + else + {printf ("best reply is "); + putpos (bestp, stdout); + } + printf ("]"); + } + if (s<0) return (2); + return (s); + } + +/********************************************************************** + + CNTOKMOVES - Count non-possibly-corner-losing-moves by C + +**********************************************************************/ + +cntokmoves (b, c) + board b; + color c; + + {register position p; + register int nmoves; + + nmoves = 0; + forallpos (p) + if (ismove (b,c,p) && !adjcorner(p)) ++nmoves; + return (nmoves); + } + +/********************************************************************** + + SQEVAL - Simple Square Evaluator + +**********************************************************************/ + +sqeval (b, c, o, p) + board b; + color c, o; + position p; + + {register int val; + extern fastchar selfplay; + extern int movnum, machine[]; + + val = sqval[p]; + if (adjcorner (p)) /* adjacent to corner on edge or diagonal */ + {register position cp; + cp = nrcorner (p); /* the corner */ + if (adjdiag (p)) val = INTERIORVALUE; + else val = EDGEVALUE; + if (b[cp] == EMPTY) + {if (adjdiag(p)) val = 1; + else if (machine[c] && trap1 (b, c, o, p)) val = 1; + /* this move bad only for the machine + since the machine is not particularly + good at taking advantage of it */ + } + } + if (val == EDGEVALUE) + {board a; + cpybrd (a,b); + putmov (a,c,p); /* try move */ + if (safedge (a,c,o,p)) + {if (trap3 (b,c,o,p)) val = CORNERVALUE; + } + else + {int v; + if ((v = trap2 (a,c,o,p)) > 0) val = v; + else val = 0; + } + } + return (val); + } + +/********************************************************************** + + NRCORNER - Return position of nearest corner + +**********************************************************************/ + +position nrcorner(p) + position p; + + {switch (quadrant [p]) { + case 1: return (pos(0,0)); + case 2: return (pos(0,7)); + case 3: return (pos(7,0)); + case 4: return (pos(7,7)); + } + return (0); + } + +/********************************************************************** + + DOTREE - Print tree of possible future machine play. + +**********************************************************************/ + +static int treedepth 0; + +dotree (b, c, o, depth, fd) + board b; + color c, o; + + { +#ifdef unix + struct mt t[32], *tp[32]; + board a; +#endif +#ifndef unix + struct mt *t, **tp; + board *a; +#endif + register int k, n; + +#ifndef unix + {int *ip; + ip = salloc (100+64+64); + t = ip; + tp = ip + 64; + a = ip + (64 + 64); + } +# endif + + ++treedepth; + k = getcandidates (b,c,o,tp,t); + if (k>10) k=10; + if (k == 0) + {treindent (fd); + if (anymvs (b,o)) + {fprintf (fd, "Forfeit\n"); + dotree (b,o,c,depth,fd); + } + else fprintf (fd, "(%d-%d)\n", cntbrd(b,c),cntbrd(b,o)); + } + else for (n=0;np; + fprintf (fd, "%d-%d %c", posx(p)+1, posy(p)+1, tp[n]->s); + if (tp[n]->c != -1000) fprintf (fd, " %d", tp[n]->c); + putc ('\n', fd); + if (treedepth < depth) + {cpybrd (a,b); + putmov (a,c,p); + dotree (a,o,c,depth,fd); + } + } + --treedepth; + +# ifndef unix + sfree (t); +# endif + } + +treindent (fd) + + {register int n; + n = treedepth; + fprintf (fd, "%2d", treedepth); + putc ('\t', fd); + while (n >= 8) {putc ('\t', fd); n =- 8;} + while (--n >= 0) putc (' ', fd); + } + \ No newline at end of file diff --git a/src/as/o/o3.rel b/src/as/o/o3.rel new file mode 100644 index 0000000000000000000000000000000000000000..bb6aecc0214413a7fd6e45cb03cfc59865aadc3a GIT binary patch literal 13414 zcma)D3s9Bkng0IEIlyY*1P_smfnS0K0}@0OlPDg9BZnZM;w6d~KyF4c7*G+xoG!_p zbkbepW-~T*I&CJ+w%u$t&1AcoPPf~po!KVqq-my`&1O1AJDps**#-y~B}C6Y&-cVr^vn{U!hL32@qj;}@s2=ZIS}{(gB@0w8^T zjyiUzjnK)X&Cr*9>_|>0hQ@ctFIPNy0g!p3zkiQ)t4iNz8>zB~)`ZqVo>4S@@y#fe zo6E9?PA|_TbO<_!1vF{*py|C~2S;j9S z0{IXDqG+#!lf`AbPuxoKie6a*qSxaP3*aY-?Ij_%zNB6ysWyj8Cww;$!@iR>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eVFzwfd!qkUR?mxQV5(X@@JMH%*bjJV;aD$xo~31 z*H&c2;M_R(>ssH1x`aGnA{oyEfI&&khP6boNRi;uWm%eOACEsrmT9p=B@*w`j_iSmwWkn2R_?rk-hS;(Y&;k~d0Uhn1Qi>F8fFZa!4bTq*8}x zCvaU5$ldMsFvQ{uV;V(=j9NgcJ%q9W&1VSoKLYX=6GE?O$Ke_ri{PaF>t$xBlZL8y z0JYE|6{<`xTPnfz_%n-Wyw_ZKedC%pw0QWMy1-!;_%lyua~73`^s@T22%ui-)zER; zJraULz;zc>GWVNKAGN&#sF{|kEZ9;7DfoRcI5L`nGj;=75CEM~4d_#g5WP%bSo8~k zR5PKnw3-e4A2+y)&*@AluvbS~RRf#^P9apirL>QGMt3Y|i#j^`fJ0wEhu8)wW@8`j|HD=ydUqQzv= 0) if (ismove (a,o,q)) + {register int temp; + temp = -meval(a,o,c,q,-minmove); + if (temp= 0) if (ismove (a,c,q)) + {register int temp; + temp = meval(a,c,o,q,minmove); + if (temp>minmove) minmove=temp; + } + } + if (minmove == -1000) /* c forfeits */ + minmove = seval(a,c,o); + } + } + --mdepth; + if (debug>1) + {printf ("%2d ", mdepth); + putn (mdepth); + putpos (p, stdout); + printf (" %d\n", minmove); + } + return (minmove); + } + +# define C CORNERSCORE +# define E EDGESCORE +# define P POINTSCORE +# define I INTERIORSCORE +# define D DANGERSCORE + +fastchar ssqval[100] { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, C, E, E, E, E, E, E, C, 0, + 0, E, D, D, D, D, D, D, E, 0, + 0, E, D, P, I, I, P, D, E, 0, + 0, E, D, I, I, I, I, D, E, 0, + 0, E, D, I, I, I, I, D, E, 0, + 0, E, D, P, I, I, P, D, E, 0, + 0, E, D, D, D, D, D, D, E, 0, + 0, C, E, E, E, E, E, E, C, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }; + + \ No newline at end of file diff --git a/src/as/o/o4.rel b/src/as/o/o4.rel new file mode 100644 index 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`XX}o?tcB`AMl_pw|L?4S(aX?yF8XK z>xt9-+%LcX^czdVb)UUC$;MA|i_wI|szVID#k!B`Znhh&I#@S1*Kn3q=dL_)^_g&% z#z1~FB^fLy-moxCvtB#1_o$-^w48nQIDObLM$&XYf2F%fI<2$L3^XNs>D%K$f^}Y& zVl15(Ys2XC(`;R+3N-CD#4pTIrr6rae%%|`X?k!JZ$#%}(&`U1A2J1TlKmuufnA}% z{XUqK8AplBZ6o@gs34Sv=p;9Wddvuu;|&BFr&vd~6-T~*F%5%$B!%0bFMk=fW&H(H Ca|c%d literal 0 HcmV?d00001 diff --git a/src/as/o/o5.c b/src/as/o/o5.c new file mode 100644 index 00000000..ae383e57 --- /dev/null +++ b/src/as/o/o5.c @@ -0,0 +1,196 @@ +#include "o.h" + +fastchar pcolor[] {'-', '@', '*'}; + +fastchar quadrant[100] { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, + 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, + 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, + 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, + 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, + 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, + 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, + 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }; + +position trymov[] { + pos(0,0), pos(0,7), pos(7,0), pos(7,7), + pos(0,1), pos(0,2), pos(0,3), pos(0,4), + pos(0,5), pos(0,6), pos(1,0), pos(1,7), + pos(2,0), pos(2,7), pos(3,0), pos(3,7), + pos(4,0), pos(4,7), pos(5,0), pos(5,7), + pos(6,0), pos(6,7), pos(7,1), pos(7,2), + pos(7,3), pos(7,4), pos(7,5), pos(7,6), + pos(2,2), pos(2,5), pos(5,2), pos(5,5), + pos(2,3), pos(2,4), pos(3,2), pos(3,5), + pos(4,2), pos(4,5), pos(5,3), pos(5,4), + pos(1,2), pos(1,3), pos(1,4), pos(1,5), + pos(2,1), pos(2,6), pos(3,1), pos(3,6), + pos(4,1), pos(4,6), pos(5,1), pos(5,6), + pos(6,2), pos(6,3), pos(6,4), pos(6,5), + pos(1,1), pos(1,6), pos(6,1), pos(6,6), + pos(3,3), pos(3,4), pos(4,3), pos(4,4), + -1 + }; + +clrbrd(b) + board b; + + {register int i; + i = 100; + while (--i>=0) b[i] = EMPTY; + b[pos(3,3)] = b[pos(4,4)] = WHITE; + b[pos(4,3)] = b[pos(3,4)] = BLACK; + b[WHITE] = b[BLACK] = 2; + } + +#ifdef unix +cpybrd (a,b) + register fastchar *a, *b; + + {register int i; + i = 100; + while (--i>=0) *a++ = *b++; + } +#endif + +cntbrd (b,c) + board b; + color c; + + {register position p; + int count; + count = 0; + forallpos (p) {if (b[p] == c) ++count;} + return (count); + } + +anymvs(b,c) + board b; + color c; + + {register position p; + forallpos (p) {if (ismove (b,c,p)) return (TRUE);} + return (FALSE); + } + +direction dirlist[] + {NORTH, EAST, SOUTH, WEST, + NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST, + 0}; + +# ifdef unix +ismov1(b,c,p1) + board b; + color c; + position p1; + + {register direction d; + direction *dd; + dd = dirlist; + while (d = *dd++) + {register position p; + int k; + p = p1; + k = 0; + while (valid (nextpos (p, d))) + {register color x; + if ((x = b[p]) == EMPTY) break; + if (x == c) + {if (k) return (TRUE); + break; + } + ++k; + } + } + return (FALSE); + } +# endif + +putmov(b,c,p1) + board b; + color c; + position p1; + + {register direction d; + direction *dd; + color o; + + b[p1] = c; + b[c] =+ sqscore (p1); + o = oppcolor (c); + dd = dirlist; + while (d = *dd++) + {register position p; + int k; + p = p1; + k = 0; + while (valid (nextpos (p, d))) + {{register color x; + if ((x = b[p]) == EMPTY) break; + if (x != c) {++k; continue;} + } + if (k==0) break; + p = p1; + while (valid (nextpos (p, d))) + {register int sscore; + if (b[p] != o) break; + b[p] = c; + b[c] =+ (sscore = sqscore (p)); + b[o] =- sscore; + } + break; + } + } + } + +putpos (p, fd) + position p; + FILE *fd; + + {fprintf(fd, "%d-%d",posx(p)+1,posy(p)+1); + } + +putcolor (c, fd) + color c; + FILE *fd; + + {if (c>=0 && c<=2) putc (pcolor[c], fd); + else putc ('?', fd); + } + +putdir (d, fd) + direction d; + FILE *fd; + + {char *s; + if (d==NORTH) s="NORTH"; + else if (d==SOUTH) s="SOUTH"; + else if (d==EAST) s="EAST"; + else if (d==WEST) s="WEST"; + else if (d==NORTHEAST) s="NORTHEAST"; + else if (d==NORTHWEST) s="NORTHWEST"; + else if (d==SOUTHEAST) s="SOUTHEAST"; + else if (d==SOUTHWEST) s="SOUTHWEST"; + else s="?"; + fprintf (fd, "%s", s); + } + +# define C CORNERVALUE +# define E EDGEVALUE +# define I INTERIORVALUE + +fastchar sqval[100] { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, C, 2, E, E, E, E, 2, C, 0, + 0, 2, 1, 3, 3, 3, 3, 1, 2, 0, + 0, E, 3, I, I, I, I, 3, E, 0, + 0, E, 3, I, I, I, I, 3, E, 0, + 0, E, 3, I, I, I, I, 3, E, 0, + 0, E, 3, I, I, I, I, 3, E, 0, + 0, 2, 1, 3, 3, 3, 3, 1, 2, 0, + 0, C, 2, E, E, E, E, 2, C, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }; diff --git a/src/as/o/o5.rel b/src/as/o/o5.rel new file mode 100644 index 0000000000000000000000000000000000000000..95d17c3494ae6065eb2f58e1b4b9969c2e55b323 GIT binary patch literal 4929 zcmbVPUrbx)6+hR8YkLrI5*ut|$gLqM3E*HLO)@2^jST@M6cR{CmTEJUVbX?_j3v-O znI%;DVGqe3ChesvQMHF@)7nX!DplH=s*|>84^+w?CQVs7ZDPsGa0n))jCkjFF7`E6 zQn6X`(eFF|zTbDg^L_VTa#_fqUj5Gx-X|9krB~DGv=Y=9Zm(rQCLonXVGKk3+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CiCd>9@Ftsf_Y zWD2dIB{AdKtkb4~>$O&?apgy|bW4g0@6$`1)~4;@`ukNrl)N^rox4zc|- z+|Q3$wlYFwJ4F8u(84ZFK#Zap3RCBtU%rWrJZFyb;|GV5A7e%FQ^uDJdV|n?Y0bw^ zqtp$qGd61v??_?l0gqC=xg1P%M2u1&-TIK&dWS_lCsC*tnQ-`}8!=C>@tvf%87AZG zzxJs#a_NoIrVz^Z2R{E)!|D$QISm#wA|FrEMqI659OH%JY~Xo=#obNan2n!d%}q>ta<|jl_JR=AY$jBMAz!ie^x;9uXuvUt72LMDnK=(2;q@)euI>*(PJEI%b2o_Y^k`EWU^y6mF+Ana;xk_fZ2ZQKQ2yqsglGqFRL zzQ2)WXt+<0^$tZ_fK<#OS=JntjXXQ+YFRgW4zr~g#STF?vi!jP!=1v9bptNl&ojxV zgsmP#L^5*>6d<-2v3xrC7IAh|BQrNRVn<+Q&Ijs+GdVns__pJ_DeO9|F&92?j$IW% zd}lbkgHb`qH-02D$EY`hhNmTV?9#xoVx6C7pC_D-kkRl6{348^9YCJ2 z3th@TW$b%nFO3L4=W#c7kWYiN&HuU}oAY=KZ*qJF92ME6Wn*fzYSQin&ADi5BpfUy&2)i00I(cWu_;n8C^W==mV1l_f>>IUv*W-w#n0z(zlto}Os29k!`DdTa!C_E L{r1!@{owo;*7V_H literal 0 HcmV?d00001 diff --git a/src/as/o/o6.c b/src/as/o/o6.c new file mode 100644 index 00000000..29d796a3 --- /dev/null +++ b/src/as/o/o6.c @@ -0,0 +1,334 @@ +#include "o.h" + +extern int display, explain; +extern fastchar pcolor[]; + +# define LEFT 0 +# define RIGHT 1 +# define TYOSIZ 1000 + +static board leftb, rightb; +static int cboard; +static int left_exists, right_exists; +static char tyobuf[TYOSIZ], *ctyop {tyobuf}; + +# define tyo(c) *ctyop++ = (c) + +# ifndef unix +# rename tyochn "TYOCHN" +extern int tyochn; +# define tyocrlf() (tyo('\r')) +# define down() (tyo(16),tyo('D')) +# define top() (tyo(16),tyo('T')) +# define horiz(n) (tyo(16),tyo('H'),tyo(8+(n))) +# define vertical(n) (tyo(16),tyo('V'),tyo(8+(n))) +# define erasechar() (tyo(16),tyo('K')) +# define eraseline() (tyo(16),tyo('L')) +# define erasescreen() (tyo(16),tyo('E')) +clrscreen () {spctty ('C');} +# define savepos() (tyo(16),tyo('S')) +# define rstrpos() (tyo(16),tyo('R')) +# endif + +# ifdef unix +static int hpos, vpos, svhpos, svvpos; +static char cmm[] {0, 10, 0, 11, 0377, 0377}; +getpos () + {ttymod (1, cmm); + vpos = cmm[0]; + hpos = cmm[2]; + vpos=11; + hpos=0; + } +# define tyocrlf() (++vpos,hpos=0,tyo('\n'),eraseline()) +# define down() (++vpos, tyo(033), tyo('B')) +# define tyoreset() (tyo(033),tyo('Y'),tyo(vpos+040),tyo(hpos+040)) +# define top() (vpos=0,hpos=0,tyoreset()) +# define horiz(n) (hpos=(n),tyoreset()) +# define vertical(n) (vpos=(n),tyoreset()) +# define erasechar() +# define eraseline() (tyo(033),tyo('K')) +# define erasescreen() (tyo(033),tyo('J')) +clrscreen () {top();erasescreen();} +# define savepos() (getpos(),svhpos=hpos,svvpos=vpos) +# define rstrpos() (hpos=svhpos,vpos=svvpos,tyoreset(),erasescreen()) +# endif + +# ifndef unix +tyoflush () + {int ptr; + if (ctyop > tyobuf) + {ptr = tyobuf; + ptr =| 0444400000000; + siot (tyochn, ptr, ctyop-tyobuf); + ctyop = tyobuf; + } + } +# endif +# ifdef unix +tyoflush () + {if (ctyop > tyobuf) + {write (1, tyobuf, ctyop-tyobuf); + ctyop = tyobuf; + } + } +# endif + +styo (s) + char *s; + {int c; + while (c = *s++) tyo(c); + } + +dpyempty () + + { + right_exists = 0; + left_exists = 0; + vertical (11); + erasescreen (); + tyoflush (); + } + +prtbrd (b) + board b; + + { + if (display) + {if (cboard == LEFT || !explain) right_exists = 0; + cpybrd (leftb,b); + cboard = LEFT; + erasescreen(); + newleft (); + left_exists = TRUE; + eraseline(); + tyoflush(); + } + else + outbrd (b); + } + +auxbrd(b) + board b; + + { + if (display) + {cboard = RIGHT; + cpybrd (rightb,b); + savepos(); + newright (); + right_exists = TRUE; + rstrpos (); + tyoflush(); + } + else + outbrd (b); + } + +shwbrd(b) + board b; + + { + if (display) + {if (cboard == LEFT || !explain) right_exists = 0; + cpybrd (leftb,b); + cboard = LEFT; + savepos (); + newleft (); + rstrpos (); + left_exists = TRUE; + tyoflush(); + } + else + outbrd (b); + } + +newleft () + + { + register int x, y; + if (!right_exists || !left_exists) {redisplay (); return;} + top(); + eraseline(); + horiz (0); + down(); + down(); + for (x=0; x<8; ++x) + {horiz (1); + for (y=0; y<8; ++y) dpysq (leftb,x,y); + horiz (0); + down(); + } + } + + +newright () + + {register int x, y; + if (!left_exists) {redisplay (); return;} + top(); + eraseline(); + horiz (0); + down(); + if (!right_exists) + {horiz (32); + styo (" 1 2 3 4 5 6 7 8"); + horiz (0); + } + down(); + for (x=0; x<8; ++x) + {horiz (32); + eraseline(); + tyo (x+'1'); + for (y=0; y<8; ++y) tyosq (rightb,x,y); + horiz (0); + down (); + } + } + +redisplay () + + { + register int x, y; + top(); + eraseline(); + tyocrlf (); + styo(" 1 2 3 4 5 6 7 8"); + if (right_exists) styo ("\t\t 1 2 3 4 5 6 7 8"); + tyocrlf (); + for (x=0; x<8; ++x) + {tyo (x+'1'); + for (y=0; y<8; ++y) tyosq (leftb,x,y); + if (right_exists) + {styo ("\t\t"); + tyo (x+'1'); + for (y=0; y<8; ++y) tyosq (rightb,x,y); + } + tyocrlf(); + } + } + +tyosq (b, x, y) + board b; + position x, y; + + {register int z; + tyo(' '); + z = b[pos(x,y)]; + if (z<=2) tyo(pcolor[z]); + else tyoletter(z); + } + +dpysq (b, x, y) + board b; + position x, y; + + {register int z; + tyo (' '); + z = b[pos(x,y)]; + erasechar (); + if (z<=2) tyo(pcolor[z]); + else tyoletter(z); + } + +tyoletter (c) + {tyo(c); + } + +outbrd (b) + board b; + + {register int x, y; + printf("\n 1 2 3 4 5 6 7 8\n"); + for (x=0; x<8; ++x) + {printf("%1d",x+1); + for (y=0; y<8; ++y) outsq (b,x,y); + putchar('\n'); + } + } + +outsq (b, x, y) + board b; + position x, y; + + {register int z; + putchar(' '); + z = b[pos(x,y)]; + if (z<=2) putchar(pcolor[z]); + else putletter(z); + } + +putletter (c) + {putchar(c); + } + +extern char gambuf[]; +extern FILE *gamefile; + +writbd(b, s) + board b; + char *s; + + {register int x, y; + register FILE *f; + char *e; + + if (s[0] == 0) s = "o.save"; + if ((f = fopen (s, "w")) == NULL) return (0); + for (x=0; x<8; ++x) + {for (y=0; y<8; ++y) putc(pcolor[b[pos(x,y)]], f); + putc('\n', f); + } +# ifndef unix + putc ('\n', f); + s = gambuf; + e = cclose (gamefile); + while (s < e) putc (*s++, f); + gamefile = copen (e, 'w', "s"); +# endif + fclose (f); + return (1); + } + +readbd(b, s) + board b; + char *s; + + {register int x, y; + register FILE *f; + extern int fcnt[], handicap; + if (s[0] == 0) s = "o.save"; + if ((f = fopen (s, "r")) == NULL) return (0); + for (x=0; x<8; ++x) + {for (y=0; y<8; ++y) switch (getc (f)) { + case '*': b[pos(x,y)] = BLACK; continue; + case '@': b[pos(x,y)] = WHITE; continue; + default: b[pos(x,y)] = EMPTY; continue; + } + getc(f); + } +# ifndef unix + getc (f); + cclose (gamefile); + gamefile = copen (gambuf, 'w', "s"); + while ((x = getc (f)) > 0) putc (x, gamefile); +# endif + fclose (f); + endgame = -1000; + setmov (b, (cntbrd (b,WHITE) + cntbrd (b,BLACK) - 1)/2); + fcnt[WHITE] = fcnt[BLACK] = handicap = 0; + right_exists = FALSE; + return (1); + } + +fixbrd (b) + board b; + + {register position p; + b[0] = b[1] = b[2] = 0; + forallpos (p) + {register color c; + if ((c = b[p]) != EMPTY) b[c] =+ sqscore (p); + } + } + \ No newline at end of file diff --git a/src/as/o/o6.rel b/src/as/o/o6.rel new file mode 100644 index 0000000000000000000000000000000000000000..30422a9b014cbc919453bb65b38559897e5b5407 GIT binary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@ +#include "obk.code" + \ No newline at end of file diff --git a/src/as/o/o7.rel b/src/as/o/o7.rel new file mode 100644 index 0000000000000000000000000000000000000000..3d391a3d62b7f175edd1fede40ab5730f07ba2f3 GIT binary patch literal 3243 zcmZuzTWl2P6+Zv0*)=lQOBjb)8gKq)HVPU2k$Lh$zc&TRY# z)OpxFbFSaH{O6w_8p(HjI`<#(M5J<~QmL4f4>El2!r%Hm_;GerIg-eUJoDJW`sUWN z_YPiwM5J|gWJ9e;)U02;`oZ7M1!BasN$+%LAd!&TL~2)SZYWVl>KE!@@uSqzhcJ`A z*4cw;I*@~)`WvY7GO0tPUI#V#B&jzSuU`4fAE`$P5u%kTWyi+ZPF7x4d1|X*R zvXeh?{_Nt<9twU!YA=6a`@zrGN@5nl`5H)FezmPe`MtbEO7d3a=9YGmRpo!>#rWw$ z@jI-~L`-Sj4*|d*k{aJB^BIV}+K;U0i0{H`l+?WGS_pw5*uRSV_ z1XuCXb0Qi`B&B|f8qasYX9|SX1~0#bw^il0VN(8UUg~!27m1X!7bK!oBn!{_DzZUh ztV}o^XC|a^E{L8-RehAV8)k->mVUn=`-tFHxtNDzdeYb3>8QrbSw8jQUPLQag;%W~ z(^5N?h1t++sET^u(oD3mbiG}(-i&0NpFXkS=?iS>R=9TJeoY})eg_6yHsiJYHadDc z1iCbR15xQp?niNS?zP4oo4AH9KhOH`Cp-r56!wBqZ+3s%^dzgGH4-Wl7;`3($?DZ#agnz#iemZMW0UjfGD&NTLa+>m;+(4&)CGRg7PRm4^?*9u`>FC z?QITKda|cDn`KMqBUva^p*6^Ay9pH9it~cP;+&XHGlye<(T?b7i=dEJU@4K9thEb7 z$A)G`yRV*iGFR;@&&Gpc>YUH(FTZ)uHJ0vBV0kYnEwZKnEfsA z(jDcn4?<64l>c6>=ZkW`>9_SnvJFyamzidn+#i!Q;jSbgT}^%(lmbeD5Zy}3Q{dO5 zA0N4w_$Hk=w#iZ)X)%SPw5YMlwi?)h`Gj4aVdEJsh5E&9NVW%i1B#oB&! z!_25fw?k}vv_j?hLZx_pTVCeNe|qh|1>(!rqP+L(E>Tn*ThXPbV{7qQig8=)La)Wv zt>JPEL*AEy1EzX9#7qPw`K4f2q5;+I1d8kFSv_Plz)gg!LI7O+XrZ|L?~W_46W$XJ zw!5?RpynKrYuesB^3&9qRm1;DV^eLs20iByv{hGRnrZbM<2F*2+sho$NnS^IOlVrW zttyL+@BZuvkH@DHO965kDtd0zf)_`dz2fd@3^v3|9M^5>STToji)4Yl0UL!C)ccrK zuxHd#^m~uJF!e%8`A}9&dr~yRhNzUfGM`*w^>P6Yk5SlcUv**7y&kbJTZgYB|vVhpB)<-hy(cO7gt~T^RGaeyTACy`RC?I zHQt?k+=&O6V9dw2Px0)jg7nXbteI}D^4w;39JtYMw<(E_I=Fk*Z5@d#?{dcLn#`(Z z#@nTzWg>3#@e@cJdmdD_k5s+e(letLZQxDsrN3*SraVf!+@`r6m98VNhP>_6!)a$U z@J`aAaBg(GWk&I3yxmC+Yuu)udZIG%jJMBMp15rref9UE+k7lbsWigN34APLb-PX5 zsfT`omwlL?_klXe_L^Q~G@fFgBH&FAQ(6Hvl_Yh_ZQ6+u=jdj<-o2pkKzc&)UH+77-hI3U@wiRhF8;93Af1krI?b@?9=^&DVn7{78VAN8#2qcWo#U(4OR7g9PiLWL g;`E%N=QD2NVd|k-=_kF8nD|Ik$6)!9WF>t52V40{a{vGU literal 0 HcmV?d00001 diff --git a/src/as/o/o8.c b/src/as/o/o8.c new file mode 100644 index 00000000..6ae2dc04 --- /dev/null +++ b/src/as/o/o8.c @@ -0,0 +1,429 @@ +int book[] {0, 1, 4, 4522016, 5701671, 7405605, 8585250, +2, 3, 4325424, 4587584, 7012432, +3, 4, 4194560, 5701904, 7340320, 8519984, +4, 5, 3408048, 4784320, 6029520, 7340256, 8650992, +5, 5, 8126560, 8257648, 8388736, 8585360, 8716448, +6, 5, 3146928, 4326592, 4588752, 4785376, 6817008, +7, 3, 4326528, 4654224, 9569440, +8, 4, 4326464, 4654160, 9569376, 9831536, +9, 5, 3146736, 4588544, 4719632, 7406624, 9962544, +10, 4, 3146672, 4588480, 4719568, 7406560, +11, 6, 3015504, 3277664, 4391792, 5702528, 6947728, 8324000, +12, 3, 3277600, 4326192, 7013184, +13, 4, 4391648, 4850416, 6947584, 7471888, +14, 3, 4391600, 6947520, 8520400, +15, 6, 3015248, 4391520, 5636720, 6947456, 8258192, 8520352, +16, 5, 3146240, 4653584, 6029856, 6947376, 8389184, +17, 2, 4653536, 7012839, +18, 5, 3146128, 4653472, 6029744, 8389056, 8651216, +19, 5, 3146048, 4653392, 6029664, 8388976, 8651136, +20, 3, 1906912, 3021056, 5642512, +21, 4, 3086496, 3152048, 3283136, 5707984, +22, 5, 4266048, 4593744, 4724832, 4855920, 7346304, +23, 6, 4199536, 5642208, 7018480, 8263680, 9574416, 9705504, +24, 4, 4200384, 5707399, 7411333, 8787906, +25, 3, 1906560, 3020704, 5642160, +26, 4, 3086160, 3150352, 3282784, 5707632, +27, 4, 4200208, 4658976, 4724528, 4855616, +28, 6, 4200096, 5641904, 7018176, 8263376, 9574112, 9705200, +29, 4, 4200048, 5707392, 8590981, 9967221, +30, 8, 3085824, 3151376, 3282464, 3413552, 4724288, 6033680, 7345744, 8656480, +32, 8, 1905968, 1971520, 3085648, 4592992, 5707120, 7345536, 8525200, 8656288, +33, 3, 4787952, 7410960, 8656160, +34, 3, 4723936, 7410928, 8656128, +35, 5, 5706912, 8259424, 8393904, 8524992, 8721616, +36, 5, 5706832, 8262752, 8524912, 8656000, 9704592, +37, 5, 3150864, 3281952, 3411600, 4789296, 6034496, +38, 5, 3150784, 3281872, 3412960, 4789232, 6034432, +39, 6, 3281744, 4199264, 4330352, 4789120, 6820752, 7345056, +40, 5, 3281664, 4330256, 4789024, 6820656, 7344960, +41, 7, 3281568, 3411136, 4788912, 6034112, 6951632, 7344864, 8393456, +42, 6, 3412544, 4723280, 6034016, 7410288, 8393344, 9966224, +43, 4, 3084800, 3150352, 3281440, 3412528, +44, 5, 3281328, 4395456, 4723152, 5638807, 6820320, +45, 6, 3412304, 4723040, 6099312, 8655232, 9703824, 9965984, +46, 7, 3084512, 3150064, 3281152, 5640464, 7344416, 8393008, 8524096, +47, 7, 3281008, 3412096, 4788368, 6164640, 7344304, 8523968, 8655056, +48, 7, 3149824, 3280912, 4788256, 5640240, 8261696, 8392784, 8523872, +49, 7, 3280784, 3411872, 4788144, 6164416, 7344080, 8523744, 8654832, +50, 6, 1838896, 2101056, 3411792, 6098784, 7343984, 8720256, +51, 5, 4198128, 5638007, 7016192, 7343888, 8523552, +52, 5, 8130208, 8261296, 8392384, 8589008, 8720096, +53, 7, 3149360, 4329024, 4787792, 6032992, 7343728, 8523392, 8654480, +54, 6, 2100688, 3149280, 4787696, 6032896, 7343632, 8654368, +55, 5, 4197760, 4787600, 6950304, 7343536, 8523200, +56, 6, 4197664, 4721968, 6819136, 6950224, 7343456, 8588656, +57, 6, 6032592, 7408864, 8127888, 8391920, 8523008, 8654096, +58, 5, 6098048, 7343248, 8391840, 8522928, 8654016, +59, 5, 3083312, 4328512, 5639248, 6818912, 8260720, +60, 7, 3279808, 4328400, 4787168, 5639152, 6818816, 8260624, 8391712, +61, 6, 4655984, 6032256, 6818704, 7343008, 8127872, 8391600, +62, 6, 6032160, 8129328, 8260416, 8391504, 8587728, 8784736, +63, 5, 3017424, 4393696, 5638896, 6818560, 8260368, +64, 7, 3279456, 4393584, 4721280, 5638800, 6818464, 8260272, 8391360, +65, 7, 4590064, 5638656, 6031888, 6818336, 7408176, 8129088, 8391248, +66, 7, 5638528, 6162832, 8128928, 8260016, 8391104, 8718800, 8784352, +67, 5, 6818096, 8194368, 8259920, 8391008, 9832816, +68, 7, 4196544, 5507280, 5703904, 6031600, 6818048, 7342352, 8522016, +69, 5, 4786288, 5507200, 6031504, 6817952, 7342256, +70, 6, 6817808, 7407648, 8128560, 8521792, 8652880, 9701472, +71, 6, 6817712, 7407552, 8128464, 8521696, 8718320, 9701376, +72, 5, 4196192, 5703536, 6817664, 7341968, 8521632, +73, 4, 4785952, 5703472, 6817600, 7341904, +74, 5, 6817472, 7341776, 8128224, 8521456, 8718080, +75, 6, 3081824, 4589168, 5637760, 7341712, 8259232, 8521392, +76, 7, 4195824, 4654592, 5637648, 7341600, 8259120, 8390208, 8521296, +77, 6, 3409296, 4720032, 6030768, 7407040, 8390096, 8652256, +78, 4, 6096208, 7341408, 8390000, 8652160, +79, 5, 5506304, 8324368, 8389920, 8521008, 8652096, +80, 6, 4653056, 4325376, 4718592, 4063232, 6684672, 3145728, +81, 4, 4653056, 4325376, 9568256, 9699328, +82, 4, 4653056, 4325376, 9568256, 9830400, +83, 5, 4587520, 7340032, 4784128, 3145728, 10027008, +84, 4, 4587520, 7340032, 4784128, 3145728, +85, 6, 4653056, 7340032, 4325376, 3145728, 4849664, 6815744, +86, 1, 8323072, +87, 6, 5701632, 4325376, 8257536, 3014656, 6815744, 9568256, +88, 6, 5701632, 7340032, 8519680, 3014656, 3145728, 6815744, +89, 6, 5636096, 4390912, 3014656, 3145728, 3276800, 6815744, +90, 6, 5701632, 4325376, 3014656, 3145728, 3276800, 6815744, +91, 6, 4325376, 4784128, 3145728, 4849664, 6815744, 7471104, +92, 2, 8585216, 4325376, +93, 6, 5636096, 4390912, 8257536, 3014656, 6815744, 9568256, +94, 7, 5636096, 7340032, 8519680, 4390912, 3080192, 3145728, 6815744, +95, 5, 4653056, 6029312, 4784128, 3145728, 6815744, +96, 4, 4784128, 3145728, 3276800, 6815744, +97, 6, 4587520, 4718592, 8323079, 3145728, 4194304, 6815744, +98, 5, 4587520, 6094848, 8388608, 8650752, 3145728, +99, 5, 4653056, 6029312, 8388608, 3145728, 6815744, +100, 3, 4653056, 6815744, 9568256, +101, 8, 4587520, 6094848, 7340032, 4718592, 8650754, 3145728, 6815744, 9961472, +102, 4, 4653056, 6029312, 4784128, 6815744, +103, 6, 6029312, 7340032, 4325376, 4784128, 3276800, 6815744, +104, 6, 4653056, 7340032, 4325376, 4718592, 4194304, 6815744, +105, 4, 6029312, 8388608, 8716288, 8781824, +106, 5, 4587520, 6029312, 7340032, 8454144, 6815744, +107, 6, 6094848, 7340032, 4784128, 8716290, 6815744, 9961472, +108, 6, 4587520, 5636096, 4325376, 4784128, 5373952, 6684672, +109, 3, 4653056, 4718592, 7471104, +110, 7, 4587520, 5636096, 4325376, 4784128, 6684672, 7995392, 6815744, +111, 3, 4587520, 7405568, 4784128, +112, 3, 4653056, 7405568, 4784128, +114, 6, 6094848, 8388608, 3145728, 3276800, 3473408, 9568256, +115, 7, 8454144, 4325376, 3080192, 3145728, 5505024, 6815744, 8126464, +116, 6, 8388608, 4325376, 6684672, 3080192, 3145728, 8126464, +117, 8, 6029312, 8388608, 8585216, 4390912, 8650752, 3145728, 7471104, 9568256, +118, 5, 4587520, 6029312, 8454144, 3145728, 9568256, +119, 3, 4653056, 6815744, 9568263, +120, 6, 4653056, 6029312, 8388608, 6684672, 3145728, 8126464, +121, 7, 4653056, 6029312, 8454144, 8650757, 3145728, 7471104, 9568256, +122, 7, 4653056, 6029312, 7340032, 8454144, 8650754, 3145728, 9568256, +123, 5, 4653056, 4325376, 6684672, 3145728, 5505024, +124, 4, 4653056, 6094848, 3145728, 7471104, +125, 5, 4653056, 4325376, 3145728, 5505024, 6815744, +126, 5, 4587520, 6029312, 7340032, 8716288, 3145728, +127, 5, 4587520, 6029312, 7405568, 3145728, 7471104, +128, 3, 4653056, 4325376, 9568256, +129, 5, 4653056, 4325376, 6684672, 3145728, 5505024, +130, 4, 4653056, 6094848, 3145728, 7471104, +131, 6, 4653056, 4325376, 6684672, 3145728, 5505024, 6815744, +132, 5, 4587520, 6029312, 7340032, 8716288, 3145728, +133, 4, 4587520, 6094848, 7405568, 3145728, +134, 3, 4653056, 4325376, 9830400, +135, 7, 6094848, 3145728, 3276800, 3407872, 9568256, 9699328, 9830400, +136, 8, 4325376, 8257536, 3014656, 3145728, 6815744, 8192000, 9568256, 9699328, +137, 11, 7340032, 8519680, 4325376, 8323072, 8650752, 3014656, 3145728, 6160384, 7471104, 9699328, 9830400, +138, 8, 4325376, 8257536, 6684672, 3014656, 3145728, 8192000, 9568256, 9699328, +139, 8, 6094848, 8585216, 4325376, 8650752, 3145728, 7471104, 9699328, 9830400, +140, 6, 4653056, 6029312, 3145728, 9568256, 9699328, 9830400, +141, 8, 4653056, 6094848, 6684672, 3145728, 6815744, 8126464, 9568256, 9699328, +142, 3, 4653056, 9568256, 9830400, +143, 7, 4653056, 7340032, 8650752, 3145728, 6160384, 9699328, 9830400, +144, 7, 4653056, 6029312, 6684672, 3145728, 8126464, 9568256, 9699328, +145, 7, 4587520, 6094848, 8650757, 3145728, 7471104, 9699328, 9830400, +146, 7, 4653056, 6094848, 7340032, 8716290, 3145728, 9699328, 9830400, +147, 2, 4587520, 5701632, +148, 5, 4587520, 7340032, 4784128, 3145728, 6815744, +149, 4, 4653056, 5636096, 7340032, 9568256, +150, 5, 4587520, 5636096, 7340032, 8323072, 9830400, +151, 5, 4653056, 7340032, 4718592, 3145728, 9699328, +152, 5, 4587520, 4390912, 3014656, 9699328, 9830400, +153, 7, 4653056, 4325376, 4718592, 3145728, 7471104, 9830400, 9961472, +154, 9, 4653056, 4325376, 4718592, 3014656, 3145728, 6815744, 9699328, 9830400, 9961472, +155, 6, 4653056, 4325376, 3014656, 9568256, 9699328, 9830400, +156, 6, 4653056, 4325376, 3014656, 9568256, 9699328, 9830400, +157, 6, 4587520, 4718592, 3014656, 3145728, 9699328, 10027008, +158, 7, 4653056, 4325376, 4718592, 3145728, 7471104, 9830400, 9961472, +159, 5, 7340032, 4325376, 3145728, 3407872, 10027008, +160, 7, 4587520, 7340032, 4390912, 8257536, 3014656, 5505024, 9830400, +161, 4, 4587520, 7405568, 3145728, 9961472, +162, 4, 5636096, 8323072, 3014656, 9830400, +163, 4, 4653056, 3145728, 7471104, 9961472, +164, 7, 5701632, 7340032, 3014656, 3145728, 6815744, 9830400, 9961472, +165, 6, 4587520, 5701632, 7340032, 8257536, 3014656, 9830400, +166, 7, 6029312, 7340032, 4784128, 8650752, 3145728, 3407872, 9961472, +167, 6, 7340032, 4718592, 3145728, 4194304, 9830400, 10027008, +168, 6, 6094848, 7340032, 8716288, 3145728, 3407872, 9961472, +169, 3, 7340032, 4390912, 9830400, +170, 7, 6029312, 8388608, 4390912, 8650752, 3145728, 8126464, 9830400, +171, 8, 6029312, 7340032, 8388608, 4390912, 8650752, 3145728, 9568256, 9830400, +172, 3, 7340032, 4390912, 9830400, +173, 5, 6094848, 7340032, 4718592, 8716288, 9961472, +174, 6, 4653056, 7340032, 4784128, 4194304, 5505024, 9961472, +175, 5, 4587520, 7340032, 8388608, 4390912, 6815744, +176, 5, 6029312, 7340032, 8388608, 8650752, 8192000, +177, 5, 6029312, 7340032, 8388608, 8716288, 9568256, +178, 6, 4587520, 4325376, 4784128, 3145728, 4849664, 7471104, +179, 7, 4587520, 4325376, 4718592, 3080192, 3145728, 6815744, 9961472, +180, 5, 4653056, 4325376, 3014656, 9568256, 9961472, +181, 6, 4653056, 4325376, 3014656, 9568256, 9830400, 9961472, +182, 5, 4653056, 4325376, 4718592, 3145728, 7471104, +183, 4, 7340032, 4325376, 3145728, 3473408, +184, 3, 4587520, 7405568, 3145728, +185, 4, 5636096, 8519680, 8323072, 3014656, +186, 3, 4653056, 3145728, 7471104, +187, 7, 4653056, 5636096, 7340032, 8519680, 8257536, 3014656, 9830400, +188, 5, 6094848, 7340032, 4784128, 3145728, 3407872, +189, 5, 7340032, 8585216, 4784128, 3145728, 4194304, +190, 4, 6029312, 7340032, 3145728, 3473408, +191, 6, 7340032, 8585216, 4390912, 4784128, 3145728, 4259840, +192, 6, 6029312, 8388608, 8585216, 4390912, 3145728, 8126464, +193, 7, 6029312, 7340032, 8454144, 8519680, 4390912, 3145728, 9568256, +194, 4, 7340032, 8585216, 4325376, 9830400, +195, 3, 6094848, 7340032, 4784128, +196, 5, 4587520, 7405568, 4718592, 4194304, 5505024, +197, 6, 4587520, 7340032, 4390912, 4718592, 4194304, 6815744, +198, 4, 6094848, 7340032, 8388608, 8192000, +199, 4, 6029312, 7405568, 8388608, 9568256, +200, 5, 4390912, 4784128, 3145728, 3276800, 4915200, +201, 5, 4325376, 4784128, 3145728, 3276800, 7471104, +202, 7, 5636096, 7012352, 8519680, 4325376, 3014656, 3276800, 9568256, +203, 4, 7405568, 4784128, 3145728, 9961472, +204, 6, 5636096, 7340032, 8585216, 3014656, 3145728, 3276800, +205, 5, 4325376, 4718592, 3145728, 3276800, 4915200, +206, 5, 4325376, 4784128, 3145728, 3276800, 7471104, +207, 7, 5636096, 4325376, 8323072, 3014656, 3276800, 9568256, 9830400, +208, 4, 7340032, 4718592, 3145728, 10027008, +209, 6, 5636096, 7340032, 8585216, 3014656, 3145728, 3276800, +210, 7, 6946816, 8388608, 8323072, 3014656, 3145728, 3276800, 5505024, +211, 6, 6029312, 6946816, 8454144, 8519680, 3145728, 3276800, +212, 7, 6946816, 8388608, 8323072, 3014656, 3145728, 3276800, 5505024, +213, 6, 8519680, 4390912, 8257536, 3014656, 3276800, 6815744, +214, 6, 6029312, 8454144, 8519680, 8650752, 3145728, 3276800, +215, 6, 6094848, 8454144, 8650752, 3145728, 3276800, 9961472, +216, 6, 6946816, 8454144, 8323072, 3014656, 3145728, 3276800, +217, 6, 6094848, 6946816, 8388608, 3145728, 3276800, 4849664, +218, 6, 5701632, 4718592, 8257536, 3014656, 3276800, 6815744, +219, 5, 6094848, 8388608, 4718592, 8650752, 3145728, +220, 5, 6094848, 8454144, 4784128, 8650752, 3145728, +221, 6, 5636096, 6946816, 4325376, 8323072, 1966080, 3014656, +222, 7, 5636096, 6946816, 4390912, 8257536, 1703936, 1966080, 3080192, +223, 4, 5701632, 6946816, 4325376, 6160384, +224, 5, 5701632, 6946816, 4325376, 4849664, 7471104, +225, 4, 5636096, 6946816, 8519680, 4390912, +226, 6, 5636096, 6946816, 8519680, 4390912, 8257536, 3014656, +227, 5, 5701632, 6946816, 4390912, 8257536, 3276800, +228, 4, 5701632, 6946816, 8257536, 3276800, +229, 6, 6946816, 7340032, 8388608, 4390912, 3276800, 4849664, +230, 7, 6946816, 7340032, 8388608, 4325376, 4784128, 3276800, 4849664, +231, 7, 5636096, 8388608, 8519680, 4784128, 8257536, 3276800, 8781824, +232, 3, 7340032, 8388608, 4784128, +233, 6, 5636096, 8388608, 8519680, 4784128, 8257536, 3276800, +234, 4, 4390912, 3145728, 3276800, 6815744, +235, 4, 4325376, 3276800, 3473408, 9568256, +236, 5, 4325376, 3276800, 3473408, 9568256, 9830400, +237, 4, 7405568, 3145728, 3407872, 9961472, +238, 3, 7405568, 3145728, 3473408, +239, 6, 6094848, 6946816, 8388608, 3145728, 3342336, 3407872, +240, 3, 3276800, 4915200, 6815744, +241, 6, 6094848, 8388608, 8650757, 3145728, 3407872, 4849664, +242, 6, 6094848, 8388608, 8650754, 3145728, 3407872, 4849664, +243, 7, 5701632, 6946816, 4325376, 8257536, 1966080, 3014656, 4849664, +244, 7, 5701632, 6946816, 4325376, 8257536, 1966080, 3014656, 4849664, +245, 6, 5636096, 6946816, 4390912, 8257536, 3014656, 6160384, +246, 6, 5636096, 6946816, 4390912, 4849664, 6160384, 7471104, +247, 6, 5636096, 7012352, 8519680, 4325376, 4849664, 6160384, +248, 8, 5636096, 7012352, 8519680, 4325376, 8257536, 3014656, 4849664, 6160384, +249, 5, 5636096, 6946816, 4390912, 1966080, 3145728, +250, 5, 5701632, 6946816, 4325376, 3145728, 3276800, +251, 6, 5701632, 6946816, 4325376, 3145728, 3276800, 3407872, +252, 3, 6946816, 4390912, 4849664, +253, 6, 5636096, 6946816, 8388608, 8519680, 4325376, 8716288, +254, 5, 5701632, 6946816, 8388608, 4325376, 9830400, +255, 6, 5636096, 6946816, 8388608, 8519680, 4390912, 9830400, +256, 6, 4718592, 1835008, 3276800, 3407872, 4915200, 6160384, +257, 6, 4718592, 1966080, 3145728, 3407872, 4915200, 6160384, +258, 5, 3145728, 3276800, 3407872, 4849664, 6225920, +259, 6, 4390912, 4718592, 3145728, 4194304, 4849664, 7471104, +260, 7, 8454144, 4390912, 3145728, 4849664, 6160384, 7471104, 9568256, +261, 5, 7340032, 8519680, 4390912, 7471104, 9830400, +262, 9, 7340032, 4390912, 4718592, 8650754, 3145728, 6160384, 7471104, 9830400, 9961472, +263, 5, 5701632, 7012352, 4325376, 1966080, 3145728, +264, 6, 5636096, 7012352, 4325376, 1966080, 3145728, 3276800, +265, 6, 5701632, 6946816, 4325376, 3145728, 3276800, 3407872, +266, 3, 7012352, 4390912, 7471104, +267, 6, 5636096, 6946816, 8388608, 8519680, 4325376, 8716288, +268, 5, 5636096, 6946816, 8388608, 4390912, 9830400, +269, 5, 5636096, 6946816, 8388608, 8519680, 4390912, +270, 7, 7012352, 8388608, 1769472, 3145728, 4849664, 6160384, 7471104, +271, 5, 6946816, 4784128, 1966080, 3276800, 4849664, +272, 9, 7012352, 7340032, 8388608, 4784128, 1966080, 2097152, 3473408, 4849664, 6160384, +273, 6, 7012352, 7340032, 8388608, 4849664, 6815744, 7471104, +274, 6, 8454144, 8519680, 8650757, 6160384, 7471104, 8781824, +275, 6, 7405568, 8585216, 8716288, 6160384, 7471104, 9699328, +276, 6, 7340032, 8454144, 8650754, 6160384, 7471104, 9830400, +277, 9, 5636096, 6946816, 4390912, 8257536, 3014656, 3276800, 6160384, 7471104, 8781824, +278, 6, 5636096, 6946816, 4390912, 3276800, 6160384, 7471104, +279, 6, 5636096, 6946816, 4390912, 4849664, 6160384, 7471104, +280, 7, 5636096, 7012352, 4325376, 8257536, 3014656, 6160384, 8781824, +281, 8, 5701632, 6946816, 4390912, 8257536, 3014656, 7471104, 8781824, 9830400, +282, 8, 5701632, 6946816, 4325376, 8257536, 3014656, 7471104, 8781824, 9830400, +283, 6, 6094848, 8388608, 8716288, 3145728, 3407872, 7471104, +284, 3, 8585216, 4194304, 7471104, +285, 6, 6094848, 8388608, 8650752, 3145728, 3407872, 7471104, +286, 7, 6029312, 8388608, 8585216, 4325376, 8650752, 3145728, 8126464, +288, 4, 6946816, 8519680, 8716288, 1769472, +289, 5, 6946816, 8519680, 8716288, 1703936, 1966080, +290, 5, 8388608, 4718592, 8716288, 2097152, 8781824, +291, 4, 8388608, 4784128, 8650752, 8781824, +292, 7, 5636096, 6946816, 4325376, 8323072, 3014656, 3276800, 8781824, +293, 5, 5701632, 6946816, 4325376, 3276800, 8781824, +294, 6, 5701632, 6946816, 4325376, 4849664, 7471104, 8781824, +295, 5, 5701632, 6946816, 4390912, 6160384, 8781824, +296, 7, 5701632, 6946816, 4325376, 8323072, 3014656, 9568256, 9830400, +297, 6, 5701632, 6946816, 4325376, 8257536, 3014656, 9830400, +298, 3, 7405568, 4718592, 3145728, +299, 6, 5636096, 7340032, 8585216, 3014656, 3145728, 3276800, +300, 7, 3145728, 4325376, 4718592, 6946816, 7405568, 7471104, 8519680, +301, 5, 3014656, 4390912, 5636096, 8126464, 8519680, +302, 6, 3145728, 4325376, 4784128, 6946816, 7471104, 8519680, +303, 5, 3014656, 4325376, 5636096, 7012352, 8519680, +304, 5, 3145728, 3407872, 6029312, 7405568, 8454144, +305, 6, 3014656, 4194304, 5701632, 7340032, 8257536, 8519680, +306, 5, 3145728, 3407872, 6094848, 7340032, 8454144, +307, 7, 3080192, 3145728, 4390912, 8192000, 8323072, 8454144, 8585216, +308, 6, 3145728, 4325376, 6029312, 7471104, 8388608, 8585216, +309, 6, 2097152, 3145728, 3407872, 6094848, 8454144, 8585216, +310, 7, 3014656, 3145728, 4390912, 5505024, 8257536, 8388608, 8519680, +311, 6, 3014656, 3276800, 4194304, 7012352, 8257536, 8519680, +312, 6, 3145728, 3276800, 3473408, 6094848, 8388608, 8519680, +313, 7, 3014656, 3145728, 4390912, 5505024, 8323072, 8388608, 8519680, +314, 6, 3145728, 3276800, 4390912, 6029312, 8388608, 8519680, +316, 7, 1703936, 1966080, 3014656, 5636096, 7012352, 8257536, 8519680, +317, 4, 2097152, 4784128, 7340032, 8454144, +318, 6, 3276800, 4718592, 5701632, 8257536, 8388608, 8519680, +319, 5, 4849664, 6946816, 7405568, 8388608, 8585216, +320, 5, 6946816, 7405568, 7471104, 8388608, 8519680, +321, 7, 1703936, 3276800, 4390912, 5636096, 6946816, 8257536, 8519680, +322, 4, 2097152, 4784128, 7340032, 8388608, +323, 5, 4849664, 6946816, 7340032, 8388608, 8585216, +324, 5, 6946816, 7405568, 7471104, 8388608, 8519680, +325, 3, 3145728, 4653056, 4784128, +326, 5, 3145728, 4587520, 6029312, 7012352, 8126464, +327, 6, 3145728, 4784128, 6029312, 7405568, 8650752, 9961472, +328, 4, 3145728, 4718592, 6094848, 7340032, +329, 3, 4587520, 6946816, 9633792, +330, 4, 3014663, 3145728, 4653056, 4718592, +331, 3, 4653056, 9633792, 9830400, +332, 6, 3145728, 4784128, 6029312, 7340032, 8716288, 9961472, +333, 4, 3145728, 4653056, 4784128, 7405568, +334, 5, 3145728, 3407872, 4653056, 6946816, 8388608, +335, 3, 3145728, 8388608, 8716288, +336, 5, 3014656, 5636096, 8323072, 8388608, 8519680, +337, 6, 3145728, 4128768, 6094848, 8388608, 8585216, 8650752, +338, 6, 3014656, 4063232, 5701632, 6946816, 8257536, 8519680, +339, 2, 4653056, 7012352, +340, 7, 1835008, 4063232, 4653056, 6029312, 6946816, 7340032, 8388608, +341, 5, 4653056, 5505024, 6029312, 6946816, 8388608, +342, 6, 3342336, 3407872, 5505024, 6094848, 6946816, 8388608, +343, 7, 4063232, 4587520, 5505024, 6815744, 6946816, 7405568, 8388608, +344, 6, 4128768, 5505024, 6029312, 8388608, 8650752, 8781824, +345, 6, 4128768, 5505024, 6029312, 7340032, 8388608, 8650752, +346, 4, 4128768, 5505024, 7340032, 8388608, +352, 6, 4194304, 5505024, 6815744, 6946816, 8323072, 8454144, +353, 6, 1703936, 1966080, 3014656, 5505024, 7012352, 8257536, +354, 5, 1966080, 3080192, 5570560, 7012352, 8323072, +355, 7, 3276800, 4784128, 5505024, 6815744, 6946816, 8257536, 8388608, +356, 5, 4849664, 6815744, 7012352, 7340032, 8388608, +357, 8, 5505024, 6815744, 6946816, 8323072, 8388608, 8519680, 8650752, 8781824, +358, 6, 5505024, 6881280, 7012352, 8257536, 8388608, 8519680, +359, 6, 3145728, 4587520, 6094848, 6946816, 7471104, 8388608, +360, 4, 4587520, 6094848, 6946816, 7471104, +362, 5, 3145728, 4784128, 6094848, 7471104, 8650752, +363, 8, 3145728, 4194304, 4587520, 4718592, 6029312, 7012352, 7471104, 8650752, +364, 6, 3145728, 4653056, 5505024, 6094848, 8126464, 8716288, +365, 5, 3145728, 4587520, 6094848, 8126464, 8650752, +366, 7, 3145728, 4587520, 4784128, 6029312, 7471104, 8650752, 9699328, +367, 2, 4587520, 8716288, +369, 7, 3014656, 3145728, 8257536, 8388608, 8519680, 8716288, 8781824, +370, 5, 3145728, 3407872, 4784128, 8388608, 8650752, +371, 5, 3145728, 4653056, 6160384, 8388608, 8650752, +372, 9, 3014656, 3145728, 4653056, 6160384, 8257536, 8454144, 8519680, 8650752, 8781824, +373, 6, 1769472, 3145728, 6094848, 8388608, 8519680, 8650752, +374, 7, 2097152, 3407872, 4718592, 6029312, 8388608, 8716288, 8847360, +375, 6, 6815744, 7012359, 8388608, 8519680, 8650757, 8781824, +376, 3, 1966080, 4587520, 8716288, +378, 5, 1769472, 4587520, 6029312, 8388608, 8650752, +379, 5, 6815744, 7012352, 8388608, 8650752, 8781824, +380, 6, 3145728, 4587520, 6029312, 7012352, 8388608, 9830400, +382, 5, 3145728, 4587520, 6029312, 7012352, 8650752, +383, 6, 3145728, 4653056, 5505024, 6029312, 8126464, 8650752, +384, 5, 3145728, 4653056, 6029312, 8650752, 9699328, +385, 8, 3145728, 4587520, 4784128, 6094848, 7340032, 8650752, 9699328, 9961472, +386, 2, 4587520, 8716288, +388, 6, 3080192, 3145728, 8323072, 8388608, 8650752, 9830400, +389, 5, 3145728, 3407872, 4784128, 8388608, 8650752, +390, 5, 3145728, 3407872, 4653056, 8388608, 8650752, +391, 8, 3014656, 3145728, 4653056, 6160384, 8257536, 8388608, 8650752, 9830400, +392, 4, 3145728, 4653056, 8388608, 8650752, +394, 6, 1769472, 3145728, 6029312, 8388608, 8650752, 9830400, +395, 5, 1703936, 1966080, 6946816, 8716288, 9830400, +396, 7, 2097152, 3407872, 4784128, 6029312, 7405568, 8388608, 8716288, +397, 6, 6815744, 7012352, 7340032, 8388608, 8650752, 9830400, +398, 3, 2031616, 4587520, 8716288, +400, 5, 1769472, 4587520, 6029312, 8388608, 8650752, +401, 5, 6815744, 7012352, 7340032, 8388608, 8650752, +}; +int *bnlist[] {0, 1, 7, 12, 18, 25, 32, 39, 44, 50, 57, +63, 71, 76, 82, 87, 95, 102, 106, 113, 120, +125, 131, 138, 146, 152, 157, 163, 169, 177, 183, +0, 193, 203, 208, 213, 220, 227, 234, 241, 249, +256, 265, 273, 279, 286, 294, 303, 312, 321, 330, +338, 345, 352, 361, 369, 376, 384, 392, 399, 406, +415, 423, 431, 438, 447, 456, 465, 472, 481, 488, +496, 504, 511, 517, 524, 532, 541, 549, 555, 562, +570, 576, 582, 589, 595, 603, 606, 614, 622, 630, +638, 646, 650, 658, 667, 674, 680, 688, 695, 702, +707, 717, 723, 731, 739, 745, 752, 760, 768, 773, +782, 787, 0, 792, 800, 809, 817, 827, 834, 839, +847, 856, 865, 872, 878, 885, 892, 899, 904, 911, +917, 925, 932, 938, 943, 952, 962, 975, 985, 995, +1003, 1013, 1018, 1027, 1036, 1045, 1054, 1058, 1065, 1071, +1078, 1085, 1092, 1101, 1112, 1120, 1128, 1136, 1145, 1152, +1161, 1167, 1173, 1179, 1188, 1196, 1205, 1213, 1221, 1226, +1235, 1245, 1250, 1257, 1265, 1272, 1279, 1286, 1294, 1303, +1310, 1318, 1325, 1331, 1336, 1342, 1347, 1356, 1363, 1370, +1376, 1384, 1392, 1401, 1407, 1412, 1419, 1427, 1433, 1439, +1446, 1453, 1462, 1468, 1476, 1483, 1490, 1499, 1505, 1513, +1522, 1530, 1539, 1547, 1555, 1563, 1571, 1579, 1587, 1594, +1601, 1609, 1618, 1624, 1631, 1637, 1645, 1652, 1658, 1666, +1675, 1684, 1689, 1697, 1703, 1709, 1716, 1722, 1727, 1735, +1740, 1748, 1756, 1765, 1774, 1782, 1790, 1798, 1808, 1815, +1822, 1830, 1835, 1843, 1850, 1858, 1866, 1874, 1881, 1889, +1898, 1905, 1916, 1923, 1931, 1939, 1944, 1952, 1959, 1966, +1975, 1982, 1993, 2001, 2009, 2017, 2025, 2036, 2044, 2052, +2061, 2071, 2081, 2089, 2094, 2102, 0, 2111, 2117, 2124, +2131, 2137, 2146, 2153, 2161, 2168, 2177, 2185, 2190, 2198, +2207, 2214, 2222, 2229, 2236, 2244, 2251, 2260, 2268, 2276, +2285, 2293, 2301, 2310, 0, 2318, 2327, 2333, 2341, 2348, +2355, 2364, 2370, 2377, 2384, 2389, 2396, 2404, 2410, 2415, +2421, 2426, 2434, 2440, 2447, 2452, 2459, 2467, 2475, 2479, +2488, 2495, 2503, 2512, 2520, 2528, 0, 0, 0, 0, +0, 2534, 2542, 2550, 2557, 2566, 2573, 2583, 2591, 2599, +0, 2605, 2612, 2622, 2630, 2637, 2646, 0, 2650, 2659, +2666, 2673, 2684, 2692, 2701, 2709, 0, 2714, 2721, 2728, +0, 2736, 2743, 2751, 2758, 2768, 0, 2772, 2780, 2787, +2794, 2804, 0, 2810, 2818, 2825, 2834, 2842, 0, 2847, +2854}; +int nnodes {401}; + \ No newline at end of file diff --git a/src/as/o/o8.record b/src/as/o/o8.record new file mode 100644 index 00000000..ae982fcc --- /dev/null +++ b/src/as/o/o8.record @@ -0,0 +1,1511 @@ +AS Nov 7 1977 18:07:21 + +1. 3-5...3-6 (0.3) +2. 3-7...3-4 (0.4) +3. 5-3...3-8 (0.3) +4. 4-6...6-4 (1.2) +5. 4-7...4-8 (0.4) +6. 7-5...7-3 (0.3) +7. 5-6...6-6 (0.4) +8. 7-4...8-4 (0.3) +9. 8-6...7-6 (0.2) +10. 8-2...4-2 (0.2) +11. 3-1...5-2 (0.2) +12. 6-2...5-1 (0.2) +13. 5-7...3-3 (0.3) +14. 2-4...2-5 (0.7) +15. 3-2...4-3 (0.9) +16. 6-3...2-3 (1.5) +17. 4-1...2-1 (0.8) +18. 6-5...5-8 (0.7) +19. 8-7...6-7 (0.5) +20. 7-1...8-5 (0.5) +21. 8-3...7-2 (0.3) +22. 1-5...1-3 (0.6) +23. 8-1...1-4 (1.6) +24. 6-1...1-6 (0.2) +25. 1-1...2-2 (0.1) +26. 1-2...Forfeit +27. 6-8...7-7 (1.2) +28. 1-7...7-8 (0.1) +29. 8-8...Forfeit +30. 2-6...Forfeit +31. 2-7...2-8 (0.1) +32. 1-8 +56-8 + AS Nov 8 1977 19:07:27 + +1. ...3-4 (0.4) +2. 3-3...3-2 (0.5) +3. 4-6...6-6 (0.2) +4. 4-3...5-2 (0.3) +5. 4-2...5-3 (0.4) +6. 6-4...5-6 (0.5) +7. 2-4...3-5 (0.8) +8. 6-2...6-1 (1.2) +9. 2-6...2-5 (1.1) +10. 5-7...5-8 (1.9) +11. 7-6...6-7 (3.0) +12. 4-8...3-8 (2.3) +13. 5-1...4-1 (1.9) +14. 7-8...6-5 (1.7) +15. 7-4...6-3 (1.9) +16. 2-3...1-4 (2.0) +17. 1-5...1-6 (1.4) +18. 1-2...3-6 (1.4) +19. 7-3...7-5 (1.3) +20. 4-7...1-3 (1.4) +21. 1-7...8-6 (0.9) +22. 8-5...8-4 (0.7) +23. 8-2...8-7 (0.4) +24. 3-7...6-8 (0.3) +25. 2-8...7-2 (0.6) +26. 8-1...7-1 (0.5) +27. 8-3...2-7 (0.1) +28. 8-8...Forfeit +29. 1-8...Forfeit +30. 7-7...Forfeit +31. 2-2...3-1 (0.1) +32. 2-1...1-1 (0.1) + +56-8 + URGW Nov 8 1977 23:24:38 + +1. ...5-6 (0.4) +2. 6-6...7-6 (0.7) +3. 5-3...5-2 (0.7) +4. 6-4...6-3 (0.4) +5. 4-6...3-3 (0.5) +6. 8-6...7-4 (0.6) +7. 4-3...3-2 (0.4) +8. 5-1...4-1 (0.6) +9. 3-1...3-4 (0.4) +10. 4-2...3-6 (0.3) +11. 6-1...6-5 (0.4) +12. 6-2...7-3 (0.5) +13. 2-1...7-5 (0.5) +14. 8-3...8-4 (0.4) +15. 8-5...5-7 (0.3) +16. 5-8...7-7 (7.3) +17. 3-5...2-2 (2.6) +18. 6-7...6-8 (0.5) +19. 2-4...8-7 (0.8) +20. 8-8...7-8 (0.6) +21. 1-1...4-8 (0.4) +22. 3-8...4-7 (0.3) +23. 3-7...1-4 (1.6) +24. 1-3...1-2 (0.3) +25. 1-5...2-5 (0.2) +26. 1-6...2-3 (0.2) +27. 2-6...2-8 (1.1) +28. 1-8...8-2 (0.3) +29. 8-1...2-7 (0.1) +30. 1-7...7-2 (0.1) +31. 7-1 +50-14 + BERN Nov 9 1977 04:40:13 + +1. ...3-4 (0.3) +2. 3-3...3-2 (0.5) +3. 3-5...3-6 (0.4) +4. 4-6...6-5 (0.3) +5. 6-4...6-6 (0.4) +6. 5-6...6-7 (0.3) +7. 6-8...5-3 (0.4) +8. 4-3...6-3 (0.5) +9. 2-1...5-2 (0.6) +10. 2-4...1-4 (0.8) +11. 4-2...2-5 (1.4) +12. 5-1...6-1 (1.6) +13. 7-1...6-2 (1.4) +14. 1-6...2-3 (1.5) +15. 1-2...1-3 (0.8) +16. 1-5...3-1 (0.6) +17. 4-1...4-7 (0.4) +18. 3-8...5-7 (0.4) +19. 3-7...2-6 (0.4) +20. 1-7...4-8 (0.5) +21. 5-8...2-7 (5.3) +22. 7-3...7-2 (2.0) +23. 7-4...2-8 (0.4) +24. 1-8...8-2 (3.4) +25. 8-1...8-4 (0.2) +26. 8-3...7-7 (1.4) +27. 8-8...7-6 (1.9) +28. 8-6...8-5 (0.4) +29. 8-7...7-5 (0.1) +30. 7-8...2-2 (0.1) +31. 1-1 +57-7 + BERN Nov 9 1977 05:33:00 + +1. ...5-6 (0.3) +2. 6-6...7-6 (0.6) +3. 3-5...3-3 (0.2) +4. 4-3...3-4 (0.3) +5. 6-5...2-6 (0.5) +6. 8-7...8-6 (0.4) +7. 8-5...4-6 (0.4) +8. 3-6...6-7 (7.9) +9. 6-8...4-2 (0.6) +10. 4-1...5-3 (7.8) +11. 1-6...3-1 (0.6) +12. 2-1...7-4 (0.4) +13. 6-4...7-5 (0.6) +14. 8-4...5-2 (0.6) +15. 2-5...8-3 (0.5) +16. 8-2...1-5 (0.5) +17. 1-4...5-1 (0.5) +18. 6-1...3-2 (0.5) +19. 2-3...6-3 (0.5) +20. 7-3...1-2 (0.4) +21. 2-4...6-2 (0.4) +22. 7-1...4-7 (0.4) +23. 4-8...3-7 (0.4) +24. 3-8...2-7 (0.3) +25. 1-7...5-8 (0.2) +26. 7-2...7-7 (0.4) +27. 8-8...7-8 (0.6) +28. 2-2...1-3 (0.2) +29. 1-1...2-8 (0.1) +30. 1-8...Forfeit +31. 5-7 +57-6 + CLR Nov 9 1977 22:59:26 + +1. ...4-3 (0.3) +2. 5-3...6-3 (0.5) +3. 3-5...3-6 (0.3) +4. 3-7...5-6 (0.3) +5. 6-2...5-2 (0.3) +6. 6-6...6-5 (0.5) +7. 6-4...7-6 (0.6) +8. 6-7...5-8 (0.8) +9. 8-6...7-3 (1.1) +10. 7-4...7-5 (1.5) +11. 4-6...3-4 (1.7) +12. 3-2...3-3 (1.7) +13. 2-4...1-4 (2.7) +14. 4-2...6-1 (3.2) +15. 8-3...8-5 (4.3) +16. 8-4...3-1 (2.9) +17. 5-7...2-5 (1.9) +18. 2-6...1-7 (2.9) +19. 2-3...6-8 (3.1) +20. 4-7...2-8 (2.6) +21. 8-7...5-1 (2.5) +22. 4-1...1-3 (0.9) +23. 7-2...7-7 (0.5) +24. 4-8...3-8 (0.4) +25. 8-8...7-1 (0.6) +26. 7-8...8-2 (0.2) +27. 8-1...2-2 (0.1) +28. 1-8...Forfeit +29. 2-7...Forfeit +30. 1-6...1-5 (0.1) +31. 1-1...1-2 (0.1) +32. 2-1 +52-12 + BERN Nov 9 1977 23:45:38 + +1. 5-3...6-3 (0.2) +2. 6-4...4-3 (0.2) +3. 3-4...6-5 (1.2) +4. 4-6...3-6 (0.4) +5. 5-6...3-5 (0.4) +6. 2-4...2-6 (0.5) +7. 1-6...3-7 (0.6) +8. 5-7...3-3 (0.7) +9. 2-3...1-4 (0.8) +10. 2-5...1-5 (0.7) +11. 1-3...6-7 (0.5) +12. 3-8...5-8 (0.5) +13. 6-6...4-7 (0.7) +14. 4-8...2-8 (0.5) +15. 7-8...7-6 (0.2) +16. 1-7...2-2 (0.2) +17. 1-2...2-7 (0.9) +18. 8-6...7-5 (0.3) +19. 1-8...8-5 (0.2) +20. 6-8...8-7 (0.1) +21. 4-2...3-2 (0.4) +22. 1-1...2-1 (0.4) +23. 3-1...5-1 (0.2) +24. 7-3...8-2 (0.3) +25. 4-1...5-2 (0.2) +26. 6-1...6-2 (0.1) +27. 7-1...Forfeit +28. 7-7...Forfeit +29. 8-3...7-2 (0.2) +30. 8-1...Forfeit +31. 8-4...7-4 (0.0) +32. 8-8 +53-11 + JSK Nov 10 1977 01:07:52 + +1. 4-6...3-6 (0.2) +2. 3-5...3-4 (0.2) +3. 5-3...5-6 (1.1) +4. 3-3...4-3 (0.4) +5. 5-7...6-7 (0.5) +6. 3-2...6-8 (0.6) +7. 5-8...4-8 (0.6) +8. 4-7...3-7 (0.5) +9. 2-8...3-8 (0.6) +10. 7-8...3-1 (0.4) +11. 6-6...6-2 (0.4) +12. 6-3...5-2 (0.4) +13. 5-1...7-3 (0.4) +14. 8-4...7-1 (0.4) +15. 7-4...6-4 (0.5) +16. 6-5...7-5 (0.7) +17. 4-2...8-5 (0.8) +18. 8-6...8-2 (0.5) +19. 7-6...7-7 (1.4) +20. 8-7...4-1 (0.5) +21. 6-1...7-2 (0.1) +22. 8-1...Forfeit +23. 8-3...Forfeit +24. 2-1...2-2 (0.1) +25. 2-4...2-6 (0.2) +26. 8-8...2-3 (0.2) +27. 1-1...2-5 (7.1) +28. 1-2...1-4 (1.0) +29. 1-3...Forfeit +30. 1-5...1-6 (0.1) +31. 1-7...2-7 (0.1) +32. 1-8 +52-12 + AS Nov 10 1977 16:07:26 + +1. 3-5...3-6 (0.2) +2. 4-6...3-4 (0.2) +3. 2-6...5-6 (0.6) +4. 6-6...3-7 (0.4) +5. 4-8...3-8 (0.5) +6. 2-8...5-7 (0.5) +7. 6-4...6-5 (0.5) +8. 4-3...3-2 (0.7) +9. 7-5...8-5 (0.6) +10. 4-2...4-1 (1.4) +11. 2-4...2-5 (1.3) +12. 5-8...6-3 (1.5) +13. 5-3...6-7 (1.7) +14. 3-3...5-2 (1.5) +15. 1-5...1-6 (1.1) +16. 1-7...4-7 (1.0) +17. 6-8...2-3 (0.5) +18. 1-4...2-7 (0.2) +19. 7-8...7-7 (0.2) +20. 1-8...Forfeit +21. 1-3...Forfeit +22. 1-2...2-2 (0.2) +23. 8-7...8-8 (0.2) +24. 8-6...Forfeit +25. 7-6...Forfeit +26. 2-1...1-1 (0.2) +27. 3-1...7-3 (3.2) +28. 7-4...5-1 (0.1) +29. 6-2...Forfeit +30. 8-3...8-2 (0.4) +31. 8-4...6-1 (0.1) +32. 8-1...Forfeit +33. 7-1...Forfeit +34. 7-2 +59-5 + RRA Nov 11 1977 14:43:59 + +1. 5-3...6-3 (0.3) +2. 6-4...4-3 (0.3) +3. 3-3...6-5 (1.2) +4. 6-6...5-6 (0.4) +5. 4-6...2-3 (0.5) +6. 4-2...3-2 (0.7) +7. 5-2...3-1 (0.9) +8. 3-4...3-6 (0.9) +9. 1-3...3-7 (1.0) +10. 5-1...4-1 (0.9) +11. 2-1...2-5 (0.5) +12. 3-5...2-4 (0.6) +13. 3-8...2-6 (0.5) +14. 6-1...6-2 (0.6) +15. 1-4...4-8 (0.6) +16. 5-8...4-7 (0.4) +17. 5-7...7-6 (0.5) +18. 7-1...6-8 (0.6) +19. 7-8...1-5 (0.4) +20. 1-6...7-2 (2.2) +21. 2-8...2-7 (2.0) +22. 1-7...1-2 (0.8) +23. 1-8...2-2 (0.1) +24. 1-1...Forfeit +25. 8-1...7-4 (0.2) +26. 6-7...7-5 (0.2) +27. 7-3...8-2 (1.0) +28. 8-3...8-5 (0.5) +29. 8-4...8-6 (0.1) +30. 8-7...7-7 (0.1) +31. 8-8 +52-12 + RRA Nov 11 1977 15:10:40 + +1. 5-3...6-3 (0.2) +2. 6-4...4-3 (0.2) +3. 3-3...6-5 (0.9) +4. 6-6...3-4 (0.3) +5. 3-5...3-6 (0.4) +6. 5-6...4-6 (0.5) +7. 5-2...3-2 (0.6) +8. 2-3...1-3 (0.9) +9. 3-1...2-4 (1.0) +10. 1-5...6-7 (0.9) +11. 2-5...5-1 (0.7) +12. 7-5...7-4 (1.1) +13. 4-2...7-3 (1.2) +14. 8-4...8-3 (1.2) +15. 8-2...1-4 (0.9) +16. 1-2...2-6 (0.6) +17. 1-6...6-2 (0.5) +18. 6-1...7-1 (0.5) +19. 8-5...8-6 (0.3) +20. 8-7...2-2 (0.2) +21. 4-1...2-1 (0.1) +22. 3-7...3-8 (0.3) +23. 1-1...5-7 (0.3) +24. 8-1...7-2 (0.2) +25. 7-6...1-7 (0.4) +26. 1-8...2-7 (0.1) +27. 2-8...4-7 (0.1) +28. 4-8...5-8 (0.2) +29. 6-8...7-8 (0.1) +30. 8-8...7-7 (0.0) + +50-14 + RRA Nov 12 1977 18:21:09 + +1. 5-3...6-3 (0.2) +2. 6-4...6-5 (0.2) +3. 6-6...4-3 (0.8) +4. 3-3...5-6 (0.3) +5. 4-6...3-6 (0.4) +6. 3-4...3-5 (0.5) +7. 4-2...3-2 (0.5) +8. 2-6...6-7 (0.7) +9. 3-1...2-4 (0.6) +10. 7-5...7-4 (1.1) +11. 5-7...5-8 (1.4) +12. 6-2...6-1 (3.1) +13. 7-6...4-7 (2.2) +14. 1-4...2-3 (2.3) +15. 8-4...5-1 (2.8) +16. 5-2...7-3 (2.8) +17. 3-8...8-6 (2.0) +18. 2-5...1-6 (2.2) +19. 4-1...2-1 (1.4) +20. 1-3...8-5 (1.3) +21. 8-7...3-7 (0.6) +22. 8-3...1-5 (0.6) +23. 1-7...7-2 (0.4) +24. 4-8...2-8 (0.3) +25. 7-8...7-7 (0.7) +26. 8-8...2-7 (0.6) +27. 6-8...2-2 (2.1) +28. 1-2...Forfeit +29. 1-8...Forfeit +30. 1-1...Forfeit +31. 7-1...8-1 (0.1) +32. 8-2 +52-12 + RRA Nov 12 1977 20:14:38 + +1. ...5-6 (0.3) +2. 6-6...7-6 (0.6) +3. 5-3...5-2 (0.6) +4. 6-4...6-3 (0.3) +5. 4-6...3-3 (0.4) +6. 6-5...7-4 (0.3) +7. 4-3...3-5 (0.3) +8. 8-6...6-7 (0.5) +9. 2-4...2-6 (0.6) +10. 2-3...8-5 (0.6) +11. 8-4...3-4 (0.5) +12. 3-6...2-5 (0.6) +13. 1-6...1-4 (0.7) +14. 1-3...1-2 (0.5) +15. 7-5...4-7 (0.6) +16. 6-8...5-8 (0.7) +17. 4-8...3-2 (0.4) +18. 5-7...3-7 (0.4) +19. 1-5...1-7 (0.2) +20. 7-8...7-7 (0.1) +21. 8-7...Forfeit +22. 3-8...Forfeit +23. 5-1...4-1 (0.4) +24. 8-8...6-1 (0.3) +25. 2-8...6-2 (0.2) +26. 4-2...2-7 (0.1) +27. 1-8...7-3 (0.1) +28. 8-3...3-1 (1.3) +29. 1-1...2-2 (0.4) +30. 2-1...8-2 (0.1) +31. 8-1...Forfeit +32. 7-1...7-2 (0.0) + +50-14 + RRA Nov 12 1977 20:32:32 + +1. ...4-3 (0.3) +2. 3-3...2-3 (0.5) +3. 4-6...4-7 (0.8) +4. 5-3...6-3 (0.3) +5. 3-5...3-6 (0.3) +6. 5-2...6-2 (0.6) +7. 3-4...4-2 (0.7) +8. 5-6...6-7 (0.5) +9. 3-2...2-5 (0.7) +10. 5-1...4-1 (0.6) +11. 3-1...6-5 (0.3) +12. 1-3...2-2 (0.2) +13. 4-8...1-4 (0.7) +14. 1-1...3-7 (0.5) +15. 1-2...5-7 (0.5) +16. 2-1...2-4 (0.1) +17. 1-5...1-6 (0.2) +18. 1-7...2-6 (0.1) +19. 3-8...2-7 (0.2) +20. 5-8...6-6 (0.2) +21. 1-8...6-4 (0.2) +22. 7-5...7-3 (0.4) +23. 7-4...8-3 (0.6) +24. 2-8...7-6 (0.2) +25. 6-8...7-8 (0.1) +26. 8-8...Forfeit +27. 7-7...Forfeit +28. 8-7...8-6 (0.1) +29. 8-4...8-5 (0.6) +30. 8-2...7-1 (0.1) +31. 6-1...7-2 (0.1) +32. 8-1 +55-9 + JSK Nov 13 1977 14:44:46 + +1. ...3-4 (0.3) +2. 5-3...6-6 (0.7) +3. 5-6...4-6 (0.9) +4. 3-3...3-2 (0.9) +5. 3-6...4-3 (0.3) +6. 3-5...6-4 (0.4) +7. 6-5...7-6 (0.5) +8. 6-3...5-2 (0.5) +9. 3-1...2-5 (0.6) +10. 8-6...5-7 (0.7) +11. 1-4...1-6 (0.8) +12. 4-8...6-8 (0.8) +13. 4-1...6-1 (1.1) +14. Forfeit...6-7 (0.6) +15. 7-5...5-8 (1.9) +16. 7-8...2-3 (1.5) +17. 2-4...4-7 (1.5) +18. 1-3...4-2 (1.2) +19. 6-2...7-3 (0.8) +20. 8-3...5-1 (0.8) +21. 7-1...2-6 (0.8) +22. 7-4...8-4 (0.7) +23. 8-5...2-2 (1.0) +24. 2-1...7-2 (0.7) +25. 3-8...3-7 (0.2) +26. 2-8...2-7 (0.2) +27. 1-5...8-7 (3.8) +28. 8-8...1-2 (1.3) +29. 1-1...1-7 (0.1) +30. 1-8...Forfeit +31. 7-7...Forfeit +32. 8-1...8-2 (0.1) + +53-11 + AS Nov 13 1977 15:56:37 + +1. ...3-4 (0.4) +2. 3-3...3-2 (0.5) +3. 3-5...3-6 (0.4) +4. 4-6...6-5 (0.3) +5. 6-4...6-6 (0.4) +6. 5-6...4-7 (0.3) +7. 5-7...7-3 (0.5) +8. 3-7...3-8 (0.6) +9. 7-6...7-5 (0.5) +10. 7-4...8-3 (1.1) +11. 8-4...8-5 (0.9) +12. 8-6...8-7 (0.7) +13. 6-7...4-8 (0.7) +14. 5-8...6-8 (0.4) +15. 2-3...5-3 (0.4) +16. 3-1...6-3 (0.2) +17. 4-3...2-4 (0.4) +18. 6-2...1-3 (0.7) +19. 4-2...6-1 (0.8) +20. 1-5...4-1 (0.5) +21. 5-1...2-1 (0.3) +22. 2-6...1-7 (0.3) +23. 2-2...1-2 (0.2) +24. 7-7...2-5 (0.3) +25. 5-2...7-8 (0.1) +26. 8-8...Forfeit +27. 1-4...1-6 (0.1) +28. 2-8...2-7 (0.1) +29. 1-8...Forfeit +30. 1-1...Forfeit +31. 7-2...7-1 (0.1) +32. 8-2...Forfeit +33. 8-1 +50-14 + MMH Nov 14 1977 17:20:12 + +1. ...6-5 (0.3) +2. 6-6...6-7 (0.6) +3. 5-3...3-3 (0.2) +4. 3-6...3-5 (0.3) +5. 3-4...4-3 (0.3) +6. 5-6...6-4 (0.5) +7. 7-3...6-3 (0.6) +8. 7-4...8-3 (0.6) +9. 6-8...4-6 (0.6) +10. 5-7...8-4 (0.7) +11. 5-2...5-1 (1.2) +12. 6-1...7-1 (1.3) +13. 6-2...4-1 (1.2) +14. 4-2...3-2 (1.0) +15. 2-1...7-5 (0.9) +16. 8-6...7-6 (1.0) +17. 8-7...4-7 (0.6) +18. 5-8...3-8 (0.5) +19. 3-7...2-8 (0.4) +20. 2-3...2-5 (0.6) +21. 1-4...2-6 (0.6) +22. 1-7...2-4 (0.7) +23. 1-3...1-6 (0.6) +24. 1-5...7-7 (1.5) +25. 8-8...1-2 (0.9) +26. 1-1...7-8 (0.9) +27. 3-1...2-2 (1.7) +28. 8-1...4-8 (0.7) +29. 1-8...7-2 (0.1) +30. 8-2...Forfeit +31. 8-5...Forfeit +32. 2-7 +58-6 + RRA Nov 14 1977 18:20:42 + +1. 5-3...6-3 (0.2) +2. 6-4...6-5 (0.2) +3. 6-6...4-3 (0.9) +4. 3-3...5-6 (0.3) +5. 4-6...3-6 (0.5) +6. 3-4...3-5 (0.5) +7. 5-2...3-7 (0.6) +8. 3-8...3-2 (0.8) +9. 3-1...4-2 (0.9) +10. 5-7...4-7 (1.1) +11. 6-7...5-8 (1.3) +12. 4-1...6-8 (1.4) +13. 7-3...2-5 (1.0) +14. 7-6...8-6 (1.5) +15. 1-5...2-3 (1.3) +16. 1-3...6-1 (1.7) +17. 6-2...7-5 (1.7) +18. 7-4...2-4 (1.9) +19. 1-4...7-1 (1.5) +20. 8-5...8-4 (1.5) +21. 8-2...8-3 (0.8) +22. 8-7...4-8 (1.0) +23. 7-8...1-6 (0.5) +24. 1-7...2-7 (0.4) +25. 2-8...1-2 (0.8) +26. 1-1...2-2 (0.2) +27. 2-1...7-7 (0.1) +28. 8-8...Forfeit +29. 5-1...7-2 (0.1) +30. 8-1...Forfeit +31. 2-6...1-8 (0.1) + +52-12 + RRA Nov 14 1977 19:26:06 + +1. 5-3...6-3 (0.2) +2. 6-4...4-3 (0.2) +3. 3-4...6-5 (1.2) +4. 4-6...3-5 (0.4) +5. 3-6...2-3 (0.4) +6. 3-3...2-4 (0.4) +7. 6-6...5-6 (0.5) +8. 1-4...2-5 (0.4) +9. 1-3...2-6 (0.5) +10. 5-7...4-7 (0.6) +11. 1-5...7-6 (0.7) +12. 5-8...3-7 (0.7) +13. 3-8...4-8 (0.6) +14. 1-6...6-8 (0.4) +15. 7-8...3-2 (0.2) +16. 6-7...7-7 (0.1) +17. 5-2...5-1 (0.6) +18. 3-1...2-2 (0.3) +19. 4-2...1-2 (0.4) +20. 1-1...4-1 (0.3) +21. 8-8...2-1 (0.3) +22. 6-1...8-7 (0.2) +23. 2-8...7-5 (0.2) +24. 6-2...7-4 (0.2) +25. 8-6...8-4 (0.3) +26. 8-5...7-3 (0.2) +27. 8-3...7-1 (1.2) +28. 8-1...7-2 (0.3) +29. 8-2...2-7 (0.1) +30. 1-7...1-8 (0.1) + +50-14 + RRA Nov 14 1977 19:34:24 + +1. ...5-6 (0.3) +2. 6-6...7-6 (0.7) +3. 5-3...5-2 (0.7) +4. 6-4...6-3 (0.4) +5. 4-6...3-3 (0.5) +6. 6-5...7-4 (0.4) +7. 4-3...3-5 (0.4) +8. 8-6...6-7 (0.6) +9. 7-3...6-2 (1.0) +10. 7-5...8-5 (1.1) +11. 8-4...3-4 (0.8) +12. 5-8...8-2 (0.8) +13. 5-7...3-6 (0.6) +14. 6-1...6-8 (0.8) +15. 7-8...5-1 (0.5) +16. 4-1...4-2 (0.3) +17. 8-3...8-7 (0.2) +18. 4-8...7-2 (0.8) +19. 3-1...3-2 (0.1) +20. 7-1...7-7 (0.1) +21. 4-7...3-8 (0.2) +22. 8-8...3-7 (0.1) +23. 8-1...Forfeit +24. 2-8...2-7 (0.1) +25. 1-8...1-7 (0.2) +26. 1-6...2-6 (0.1) +27. 1-5...Forfeit +28. 2-5...2-4 (1.3) +29. 1-4...2-3 (0.5) +30. 1-3...1-2 (0.1) +31. 1-1...Forfeit +32. 2-1...2-2 (0.1) + +51-13 + RRA Nov 14 1977 21:05:48 + +1. ...6-5 (0.3) +2. 6-6...6-7 (0.6) +3. 3-5...2-5 (0.6) +4. 6-4...6-3 (0.3) +5. 7-4...7-3 (0.4) +6. 5-6...4-6 (0.6) +7. 6-8...3-3 (0.7) +8. 3-4...4-3 (0.6) +9. 3-6...4-7 (0.7) +10. 3-8...7-6 (0.7) +11. 6-2...8-3 (1.0) +12. 8-6...6-1 (0.7) +13. 1-4...1-6 (0.5) +14. 2-3...2-4 (0.8) +15. 5-3...2-6 (1.4) +16. 7-5...8-5 (1.2) +17. 3-7...1-2 (2.0) +18. 3-2...3-1 (2.4) +19. 8-4...8-7 (2.3) +20. 5-2...4-2 (1.9) +21. 4-1...5-1 (1.6) +22. 7-1...5-7 (1.2) +23. 2-1...4-8 (0.9) +24. 5-8...7-2 (1.3) +25. 8-1...7-8 (1.4) +26. 8-2...1-3 (0.7) +27. 8-8...1-5 (1.1) +28. 7-7...2-7 (0.6) +29. 2-8...2-2 (0.1) +30. 1-8...Forfeit +31. 1-7...Forfeit +32. 1-1 +54-10 + JSK Nov 14 1977 23:19:16 + +1. ...3-4 (0.3) +2. 3-3...3-2 (0.5) +3. 3-5...3-6 (0.4) +4. 4-6...6-5 (0.3) +5. 6-6...6-7 (0.4) +6. 5-3...6-3 (0.4) +7. 6-4...7-4 (0.3) +8. 4-3...6-2 (0.4) +9. 5-2...6-1 (0.5) +10. 4-2...3-1 (0.5) +11. 5-1...4-1 (0.4) +12. 8-4...7-5 (0.4) +13. 5-6...7-6 (0.5) +14. 8-5...3-7 (0.4) +15. 8-6...5-7 (0.2) +16. 6-8...8-3 (0.3) +17. 8-2...7-8 (1.5) +18. 4-8...8-7 (0.3) +19. 8-8...5-8 (0.2) +20. 7-7...3-8 (0.1) +21. 4-7...Forfeit +22. 7-3...Forfeit +23. 2-8...Forfeit +24. 2-6...2-7 (0.7) +25. 2-5...2-4 (0.4) +26. 1-8...Forfeit +27. 1-7...Forfeit +28. 1-4...2-3 (3.6) +29. 1-3...1-5 (1.3) +30. 1-6...7-2 (0.9) +31. 8-1...2-2 (0.1) +32. 7-1...Forfeit +33. 2-1...1-1 (0.1) +34. 1-2 +59-5 + WJL Nov 7 1977 15:08:19 + +1. 5-3...6-3 (0.3) +2. 6-4...6-5 (0.2) +3. 6-6...4-3 (1.0) +4. 3-5...5-6 (0.4) +5. 4-6...4-7 (0.4) +6. 3-6...3-7 (0.4) +7. 3-8...2-5 (0.5) +8. 3-4...2-6 (0.7) +9. 3-3...5-8 (0.7) +10. 1-7...2-4 (0.8) +11. 5-7...6-8 (0.8) +12. 1-4...7-5 (0.9) +13. 6-7...7-8 (0.8) +14. 1-3...3-2 (0.5) +15. 8-5...7-4 (0.7) +16. 8-4...2-3 (0.5) +17. 3-1...8-6 (2.8) +18. 8-7...7-3 (0.7) +19. 7-6...1-6 (1.8) +20. 1-5...4-1 (0.4) +21. 5-1...7-7 (2.0) +22. 1-2...2-2 (0.3) +23. 8-3...4-2 (0.4) +24. 1-1...6-2 (0.3) +25. 2-1...4-8 (0.3) +26. 8-8...8-2 (0.7) +27. 8-1...2-8 (1.4) +28. 5-2...7-2 (0.4) +29. 6-1...7-1 (0.1) +30. 2-7...1-8 (0.1) + +52-12 + RAMESH Nov 7 1977 17:08:22 + +1. 3-5...3-6 (0.2) +2. 3-7...5-6 (0.4) +3. 6-3...5-3 (0.3) +4. 6-4...7-3 (0.9) +5. 6-6...3-4 (0.3) +6. 3-3...6-5 (0.5) +7. 4-6...2-5 (0.5) +8. 1-4...3-8 (0.7) +9. 2-4...7-6 (0.7) +10. 4-7...2-6 (0.5) +11. 4-3...4-2 (0.7) +12. 4-1...3-2 (0.8) +13. 1-7...4-8 (1.0) +14. 8-6...6-7 (1.3) +15. 2-3...1-6 (4.7) +16. 1-5...1-2 (1.0) +17. 5-2...5-1 (4.1) +18. 6-1...2-1 (1.0) +19. 6-2...8-5 (0.8) +20. 8-4...8-2 (0.9) +21. 5-7...7-1 (1.5) +22. 8-1...5-8 (1.6) +23. 8-3...1-3 (0.2) +24. 1-1...Forfeit +25. 7-2...Forfeit +26. 7-4...7-5 (0.1) +27. 8-7...7-7 (0.1) +28. 8-8...7-8 (0.1) +29. 6-8...Forfeit +30. 3-1...Forfeit +31. 2-2...Forfeit +32. 2-7...Forfeit +33. 2-8 +59-4 + RAMESH Nov 7 1977 19:57:50 + +1. ...4-3 (0.3) +2. 3-3...2-3 (0.5) +3. 4-6...4-7 (0.8) +4. 3-7...5-6 (0.3) +5. 4-8...3-6 (0.2) +6. 3-5...2-4 (0.5) +7. 3-4...2-5 (0.4) +8. 6-4...6-5 (0.6) +9. 6-6...6-7 (0.8) +10. 1-5...5-7 (0.7) +11. 5-8...7-3 (1.0) +12. 5-3...6-3 (1.1) +13. 1-4...2-8 (0.9) +14. 6-8...7-5 (0.7) +15. 8-5...7-6 (0.8) +16. 8-6...2-6 (0.6) +17. 1-6...2-7 (2.3) +18. 1-3...7-7 (0.3) +19. 1-7...7-4 (0.3) +20. 7-8...Forfeit +21. 1-2...2-2 (0.1) +22. 8-2...8-3 (0.2) +23. 8-4...Forfeit +24. 5-2...7-2 (0.3) +25. 4-2...6-2 (0.5) +26. 1-1...3-1 (0.6) +27. 3-2...4-1 (6.0) +28. 5-1...2-1 (2.0) +29. 1-8...7-1 (0.9) +30. 3-8...6-1 (0.1) +31. 8-1...Forfeit +32. 8-8...Forfeit +33. 8-7 +54-10 + RAMESH Nov 8 1977 13:03:25 + +1. ...5-6 (0.3) +2. 6-6...7-6 (0.7) +3. 5-3...5-2 (0.6) +4. 6-2...4-3 (0.3) +5. 5-1...6-3 (0.3) +6. 6-4...6-1 (0.5) +7. 7-1...7-5 (0.3) +8. 4-1...7-3 (0.2) +9. 8-4...8-3 (0.2) +10. 8-2...Forfeit +11. 7-4...7-2 (0.1) +12. 6-5...4-2 (0.1) +13. 8-1...8-5 (0.1) +14. 8-6...Forfeit +15. 8-7...7-7 (0.1) +16. 3-1...3-2 (0.1) +17. 2-1...3-3 (0.2) +18. 3-4...2-4 (0.2) +19. 1-4...3-5 (0.2) +20. 2-3...1-5 (0.4) +21. 1-6...1-3 (0.3) +22. 1-2...2-2 (0.1) +23. 3-6...4-6 (0.2) +24. 1-1...3-7 (0.2) +25. 2-5...2-6 (0.1) +26. 1-7...Forfeit +27. 8-8...5-7 (8.0) +28. 5-8...7-8 (4.7) +29. 6-8...4-8 (0.1) +30. 6-7...Forfeit +31. 3-8...2-7 (0.1) +32. 1-8...2-8 (0.1) +33. 4-7 +60-4 + RAMESH Nov 8 1977 16:39:28 + +1. ...6-5 (0.3) +2. 6-6...6-7 (0.7) +3. 3-5...2-5 (0.6) +4. 2-6...3-4 (0.3) +5. 1-5...3-6 (0.3) +6. 4-6...1-6 (0.5) +7. 1-7...5-7 (0.2) +8. 3-3...4-7 (0.3) +9. 5-6...2-3 (0.4) +10. 4-8...2-4 (0.6) +11. 1-4...3-8 (0.4) +12. 2-8...3-7 (0.3) +13. 1-3...4-2 (0.3) +14. 5-8...2-7 (2.0) +15. 6-8...2-2 (0.1) +16. 5-1...4-3 (0.2) +17. 5-2...3-2 (0.3) +18. 7-8...4-1 (0.4) +19. 1-8...6-1 (0.3) +20. 1-2...7-7 (0.1) +21. 6-4...5-3 (0.4) +22. 8-8...8-7 (0.3) +23. 1-1...2-1 (0.3) +24. 3-1...6-2 (0.2) +25. 8-6...7-6 (0.2) +26. 8-5...6-3 (0.2) +27. 7-1...7-2 (0.1) +28. 7-5...7-3 (0.6) +29. 8-1...8-2 (0.2) +30. 8-3...7-4 (0.1) +31. 8-4 +51-13 + RAMESH Nov 8 1977 19:16:28 + +1. ...3-4 (0.3) +2. 3-3...3-2 (0.5) +3. 6-4...7-4 (0.9) +4. 7-3...6-5 (0.3) +5. 8-4...6-3 (0.3) +6. 5-3...8-3 (0.5) +7. 8-2...4-2 (0.3) +8. 6-6...5-2 (0.3) +9. 4-3...5-6 (0.4) +10. 8-5...7-6 (0.4) +11. 5-1...6-1 (0.4) +12. 7-1...6-2 (0.2) +13. 4-1...7-2 (0.1) +14. 3-5...7-5 (0.2) +15. 8-6...2-5 (0.2) +16. 3-1...Forfeit +17. 1-6...2-3 (0.3) +18. 8-7...1-5 (0.2) +19. 1-4...1-3 (0.3) +20. 1-2...7-7 (1.3) +21. 8-1...2-1 (0.1) +22. 1-1...Forfeit +23. 2-2...Forfeit +24. 2-4...Forfeit +25. 2-6...Forfeit +26. 8-8...4-6 (0.2) +27. 3-6...6-7 (7.3) +28. 5-8...5-7 (3.4) +29. 4-8...4-7 (0.9) +30. 3-8...6-8 (1.1) +31. 7-8...3-7 (0.4) +32. 2-8...1-7 (0.1) +33. 1-8...2-7 (0.1) + +52-12 + RAMESH Nov 8 1977 19:28:03 + +1. ...6-5 (0.3) +2. 6-6...6-7 (0.7) +3. 3-5...2-5 (0.6) +4. 2-6...3-4 (0.3) +5. 1-5...3-6 (0.3) +6. 4-6...1-6 (0.5) +7. 1-7...5-7 (0.3) +8. 1-4...3-7 (0.2) +9. 5-6...4-7 (0.2) +10. 3-8...2-7 (0.2) +11. 4-8...2-4 (0.2) +12. 5-8...2-8 (0.1) +13. 1-8...Forfeit +14. 6-3...6-4 (0.2) +15. 6-8...7-3 (0.3) +16. 8-2...7-4 (0.3) +17. 5-3...4-3 (0.5) +18. 1-3...8-3 (0.5) +19. 8-4...8-5 (0.2) +20. 8-6...7-5 (0.2) +21. 7-6...8-7 (1.2) +22. 8-8...7-8 (0.1) +23. 7-7...Forfeit +24. 3-3...2-3 (0.2) +25. 1-2...6-2 (0.2) +26. 6-1...7-2 (1.8) +27. 8-1...7-1 (4.6) +28. Forfeit...4-2 (1.7) +29. 3-1...5-2 (0.9) +30. 4-1...5-1 (0.3) +31. Forfeit...3-2 (0.1) +32. 2-2...2-1 (0.1) +33. 1-1 +57-7 + WJL Nov 9 1977 16:22:47 + +1. ...6-5 (0.3) +2. 6-6...6-7 (0.7) +3. 3-5...2-5 (0.6) +4. 2-6...3-4 (0.3) +5. 1-5...3-6 (0.3) +6. 4-6...1-6 (0.5) +7. 1-7...4-7 (0.2) +8. 5-6...5-7 (0.2) +9. 1-4...3-7 (0.2) +10. 5-8...4-8 (0.3) +11. 3-8...2-7 (0.1) +12. 4-3...2-3 (0.3) +13. 2-4...3-3 (0.3) +14. 1-3...3-2 (0.3) +15. 3-1...2-8 (0.3) +16. 1-8...2-2 (0.2) +17. 6-4...1-2 (0.3) +18. 6-8...2-1 (0.5) +19. 1-1...5-3 (0.3) +20. 4-1...7-3 (0.2) +21. 4-2...5-2 (0.3) +22. 5-1...7-8 (3.0) +23. 8-8...6-1 (0.2) +24. 7-1...6-3 (0.2) +25. 6-2...7-4 (0.2) +26. 8-2...8-3 (0.2) +27. 8-4...8-5 (1.6) +28. 8-6...7-5 (0.5) +29. 7-7...7-2 (0.1) +30. 8-1...7-6 (0.1) +31. 8-7 +55-9 + RAMESH Nov 10 1977 11:46:01 + +1. ...3-4 (0.3) +2. 3-3...3-2 (0.5) +3. 6-4...7-4 (0.9) +4. 7-3...6-5 (0.3) +5. 8-4...6-3 (0.3) +6. 5-3...8-3 (0.5) +7. 8-2...5-2 (0.2) +8. 4-3...6-2 (0.2) +9. 5-1...4-2 (0.3) +10. 6-6...5-6 (0.4) +11. 8-5...6-1 (0.5) +12. 7-1...6-7 (0.2) +13. 4-1...7-2 (0.1) +14. 6-8...7-5 (0.2) +15. 8-1...7-6 (0.2) +16. 3-6...5-8 (0.3) +17. 4-8...4-6 (0.2) +18. 8-6...5-7 (0.3) +19. 4-7...3-5 (0.3) +20. 3-7...2-6 (0.3) +21. 1-6...3-8 (0.3) +22. 2-8...7-7 (0.2) +23. 3-1...2-2 (0.3) +24. 2-3...2-1 (0.3) +25. 1-1...2-4 (0.4) +26. 1-4...1-2 (0.3) +27. 1-3...2-7 (2.5) +28. 8-7...2-5 (1.1) +29. 1-5...Forfeit +30. 1-8...1-7 (0.1) +31. 7-8...8-8 (0.1) + +51-13 + WJL Nov 10 1977 15:31:23 + +1. ...4-3 (0.3) +2. 3-3...2-3 (0.5) +3. 4-6...4-7 (0.8) +4. 3-5...3-6 (0.4) +5. 3-7...2-5 (0.4) +6. 4-8...5-7 (0.5) +7. 3-4...2-4 (0.8) +8. 5-6...6-7 (0.7) +9. 1-5...3-8 (0.6) +10. 2-8...6-5 (0.5) +11. 5-8...2-6 (0.3) +12. 1-4...1-6 (0.2) +13. 1-7...2-7 (0.1) +14. 6-6...6-8 (0.2) +15. 7-8...7-6 (0.2) +16. 1-8...7-7 (0.1) +17. 6-4...1-3 (0.3) +18. 8-8...8-7 (0.3) +19. 8-6...5-3 (0.2) +20. 1-2...8-5 (0.2) +21. 8-4...7-3 (0.2) +22. 7-5...7-4 (0.1) +23. 8-3...2-2 (0.1) +24. 8-2...6-3 (0.1) +25. 6-2...5-2 (0.1) +26. 1-1...2-1 (0.2) +27. 3-1...7-1 (1.3) +28. 3-2...4-2 (0.3) +29. 4-1...5-1 (0.1) +30. 6-1...7-2 (0.1) +31. 8-1 +56-8 + DJE Nov 11 1977 09:08:55 + +1. ...4-3 (0.3) +2. 3-5...3-6 (0.8) +3. 5-3...6-3 (0.3) +4. 4-6...3-4 (0.6) +5. 3-3...4-7 (0.4) +6. 2-5...2-6 (0.6) +7. 4-8...5-7 (0.8) +8. 6-6...6-8 (0.8) +9. 4-2...4-1 (1.2) +10. 5-2...2-3 (1.5) +11. 2-4...1-6 (1.7) +12. 1-4...6-4 (1.1) +13. 5-6...5-1 (1.8) +14. 6-5...3-7 (1.0) +15. 3-8...6-7 (0.9) +16. 7-5...7-6 (1.3) +17. 2-8...1-5 (1.4) +18. 8-6...1-3 (0.8) +19. 7-3...5-8 (0.6) +20. 7-8...8-4 (0.7) +21. 3-2...7-4 (1.1) +22. 8-5...8-7 (1.0) +23. 3-1...2-1 (0.4) +24. 6-2...6-1 (0.4) +25. 8-3...8-2 (0.2) +26. 7-2...2-7 (0.4) +27. 1-8...1-7 (1.1) +28. 2-2...1-1 (0.5) +29. 1-2...7-1 (0.1) +30. 8-1...Forfeit +31. 8-8...Forfeit +32. 7-7 +51-13 + RAMESH Nov 11 1977 10:53:59 + +1. ...3-4 (0.3) +2. 3-3...3-2 (0.5) +3. 6-4...7-4 (0.9) +4. 7-3...6-5 (0.3) +5. 8-4...6-3 (0.3) +6. 5-3...6-2 (0.5) +7. 5-1...6-1 (0.4) +8. 7-1...8-3 (0.3) +9. 8-2...Forfeit +10. 4-3...5-2 (0.2) +11. 6-6...7-6 (0.3) +12. 4-1...7-5 (0.3) +13. 8-5...5-6 (0.2) +14. 4-6...4-7 (0.2) +15. 8-6...7-2 (0.1) +16. 4-2...3-1 (0.2) +17. 2-1...Forfeit +18. 8-7...7-7 (1.5) +19. 8-1...2-2 (0.1) +20. 1-1...2-3 (0.3) +21. 1-4...1-3 (0.3) +22. 1-2...3-5 (0.1) +23. 8-8...5-7 (0.2) +24. 5-8...7-8 (0.3) +25. 6-8...4-8 (0.1) +26. 6-7...Forfeit +27. 3-8...3-7 (0.1) +28. 2-8...2-7 (0.1) +29. 1-7...Forfeit +30. 2-4...2-5 (0.4) +31. 3-6...2-6 (0.2) +32. 1-6...1-5 (0.1) +33. Forfeit...1-8 (0.1) + +51-13 + AS Nov 11 1977 12:22:07 + +1. ...3-4 (0.4) +2. 3-3...3-2 (0.5) +3. 3-5...3-6 (0.4) +4. 4-6...6-5 (0.3) +5. 6-4...6-6 (0.4) +6. 5-6...4-7 (0.4) +7. 5-7...7-3 (0.5) +8. 7-4...8-3 (0.8) +9. 2-4...5-3 (1.3) +10. 5-2...3-7 (1.1) +11. 7-5...4-3 (1.1) +12. 8-4...8-5 (1.3) +13. 3-8...6-3 (2.2) +14. 4-2...2-3 (1.8) +15. 6-2...7-6 (2.3) +16. 3-1...1-4 (2.0) +17. 8-7...6-7 (2.2) +18. 6-8...2-5 (2.5) +19. 2-6...4-8 (2.3) +20. 5-8...6-1 (1.6) +21. 5-1...1-7 (1.2) +22. 1-2...4-1 (0.7) +23. 7-1...2-7 (0.4) +24. 2-1...2-8 (0.4) +25. 1-8...8-6 (0.3) +26. 8-2...2-2 (0.7) +27. 1-1...7-2 (1.4) +28. 8-1...7-7 (0.5) +29. 1-3...1-5 (0.1) +30. 1-6...Forfeit +31. 7-8...8-8 (0.1) + +52-12 + RAMESH Nov 12 1977 11:20:04 + +1. ...4-3 (0.3) +2. 3-3...2-3 (0.5) +3. 4-6...4-7 (0.8) +4. 3-7...5-6 (0.3) +5. 4-8...3-6 (0.3) +6. 3-5...2-4 (0.5) +7. 3-4...3-8 (0.4) +8. 2-8...Forfeit +9. 6-4...6-5 (0.3) +10. 6-6...5-7 (0.4) +11. 1-4...6-3 (0.7) +12. 2-6...7-6 (0.7) +13. 8-6...2-5 (0.7) +14. 5-8...5-3 (0.7) +15. 7-5...6-8 (0.5) +16. 7-8...1-6 (0.8) +17. 1-3...1-5 (0.5) +18. 1-7...6-7 (0.3) +19. 1-2...8-4 (0.3) +20. 7-4...8-5 (0.2) +21. 8-3...7-3 (0.2) +22. 8-2...7-2 (1.5) +23. 8-1...7-1 (0.2) +24. 6-1...5-2 (0.2) +25. 6-2...4-2 (0.2) +26. 3-1...3-2 (0.3) +27. 2-1...2-7 (2.1) +28. 1-8...2-2 (0.6) +29. 1-1...8-7 (0.4) +30. 8-8...Forfeit +31. 7-7...Forfeit +32. 4-1...5-1 (0.1) + +52-12 + RSP Nov 12 1977 12:38:39 + +1. ...4-3 (0.3) +2. 3-3...2-3 (0.5) +3. 4-6...4-7 (0.8) +4. 3-7...6-6 (0.3) +5. 6-4...6-5 (0.3) +6. 4-8...7-4 (0.3) +7. 7-3...6-3 (0.2) +8. 5-3...8-3 (0.5) +9. 3-4...2-4 (0.4) +10. 3-5...5-6 (0.4) +11. 1-3...2-6 (0.6) +12. 4-2...3-6 (1.2) +13. 7-5...5-2 (1.5) +14. 2-5...1-6 (1.9) +15. 1-5...4-1 (1.7) +16. 1-2...1-4 (1.8) +17. 1-7...3-2 (1.3) +18. 6-1...8-6 (1.5) +19. 6-2...7-6 (1.3) +20. 2-1...3-8 (1.1) +21. 2-8...5-7 (0.9) +22. 5-8...6-7 (1.1) +23. 6-8...3-1 (1.0) +24. 5-1...7-2 (1.0) +25. 7-1...2-7 (0.2) +26. 8-5...8-4 (0.3) +27. 1-8...7-8 (1.8) +28. 8-8...8-7 (0.6) +29. 7-7...Forfeit +30. 2-2...Forfeit +31. 8-1...Forfeit +32. 8-2 +55-8 + RSP Nov 12 1977 15:15:33 + +1. 3-5...3-6 (0.2) +2. 4-6...5-6 (0.2) +3. 6-5...3-4 (1.0) +4. 5-3...6-4 (0.4) +5. 6-3...7-5 (0.4) +6. 6-6...7-6 (0.5) +7. 3-7...4-7 (0.5) +8. 8-5...7-3 (0.6) +9. 3-8...6-7 (1.0) +10. 6-8...7-4 (0.9) +11. 5-7...4-2 (0.8) +12. 8-6...6-2 (0.8) +13. 8-4...4-8 (0.7) +14. 5-8...4-3 (0.5) +15. 6-1...5-1 (0.7) +16. 4-1...5-2 (0.6) +17. 8-3...3-1 (0.3) +18. 2-1...8-7 (1.3) +19. 8-8...7-8 (0.1) +20. 7-1...7-2 (0.1) +21. 8-2...2-7 (0.1) +22. 7-7...2-8 (0.1) +23. 1-8...Forfeit +24. 1-7...Forfeit +25. 8-1...2-6 (0.1) +26. 1-6...Forfeit +27. 3-2...Forfeit +28. 3-3...2-5 (0.3) +29. 1-5 +57-0 + RSP Nov 12 1977 17:58:27 + +1. ...5-6 (0.3) +2. 6-6...7-6 (0.7) +3. 5-3...5-2 (0.6) +4. 6-2...4-3 (0.3) +5. 5-1...6-3 (0.3) +6. 6-4...6-1 (0.5) +7. 7-1...7-4 (0.3) +8. 6-5...7-3 (0.2) +9. 8-4...7-5 (0.3) +10. 4-6...8-3 (0.4) +11. 8-2...4-7 (0.2) +12. 8-5...8-6 (0.2) +13. 8-7...7-2 (0.1) +14. 4-1...4-2 (0.1) +15. 8-1...7-7 (0.1) +16. 8-8...5-7 (0.2) +17. 3-1...7-8 (0.2) +18. 6-8...3-2 (0.1) +19. 6-7...Forfeit +20. 5-8...Forfeit +21. 2-3...2-2 (0.1) +22. 1-2...2-1 (0.1) +23. 1-1...1-4 (0.1) +24. 3-3...3-4 (0.1) +25. 1-3...Forfeit +26. 2-4...Forfeit +27. 1-5...Forfeit +28. 4-8...3-7 (0.6) +29. 2-8 +55-0 + RSP Nov 13 1977 20:27:44 + +1. ...3-4 (0.3) +2. 3-3...3-2 (0.5) +3. 6-4...7-4 (0.9) +4. 5-3...6-3 (0.4) +5. 7-3...5-2 (0.4) +6. 8-4...7-5 (0.5) +7. 4-3...4-2 (0.8) +8. 6-5...7-6 (0.6) +9. 5-1...6-2 (0.6) +10. 4-1...8-3 (0.6) +11. 8-2...6-1 (0.4) +12. 7-1...5-6 (0.2) +13. 3-1...7-2 (0.1) +14. 8-5...Forfeit +15. 8-1...Forfeit +16. 8-6...Forfeit +17. 6-6...6-7 (0.2) +18. 6-8...7-7 (0.2) +19. 2-1...5-7 (0.3) +20. 8-7...Forfeit +21. 5-8...4-6 (0.3) +22. 3-6...4-8 (0.3) +23. 3-8...3-5 (0.2) +24. 4-7...7-8 (0.2) +25. 8-8...2-6 (0.1) +26. 1-6...3-7 (0.1) +27. 2-8...1-7 (3.1) +28. 1-8...2-7 (0.1) +29. 1-5...2-5 (0.1) +30. 1-4...2-4 (0.1) +31. 1-3...2-3 (0.1) +32. 2-2...1-2 (0.1) +33. 1-1 +57-7 + WJL Nov 14 1977 15:14:47 + +1. ...4-3 (0.3) +2. 3-5...6-6 (0.8) +3. 6-3...4-6 (0.9) +4. 5-6...6-7 (1.1) +5. 3-3...6-4 (0.4) +6. 5-3...3-4 (0.4) +7. 3-6...5-2 (0.5) +8. 6-5...7-3 (0.8) +9. 8-3...7-4 (0.9) +10. 5-1...6-2 (0.8) +11. 5-7...3-2 (1.1) +12. 7-8...5-8 (1.2) +13. 6-1...7-5 (1.2) +14. 8-4...7-6 (1.2) +15. 8-5...2-6 (0.6) +16. 4-2...4-1 (0.5) +17. 3-1...7-2 (0.3) +18. 7-1...Forfeit +19. 2-1...2-2 (0.1) +20. 1-1...1-2 (0.3) +21. 1-3...2-3 (0.2) +22. 1-4...Forfeit +23. 2-4...2-5 (0.1) +24. 1-6...1-5 (0.2) +25. 8-1...1-7 (0.1) +26. 8-2...Forfeit +27. 1-8...Forfeit +28. 2-7...3-7 (0.1) +29. 2-8...3-8 (0.1) +30. 4-8...6-8 (0.6) +31. 4-7...8-8 (0.2) +32. 8-6...7-7 (0.1) +33. 8-7 +56-8 + RAMESH Nov 14 1977 16:28:56 + +1. ...5-6 (0.3) +2. 6-6...7-6 (0.7) +3. 5-3...5-2 (0.6) +4. 6-4...6-3 (0.4) +5. 6-2...7-4 (0.4) +6. 5-1...3-4 (0.5) +7. 8-5...6-1 (0.4) +8. 7-1...4-3 (0.3) +9. 3-5...3-3 (0.4) +10. 3-2...4-2 (0.5) +11. 7-3...8-4 (0.5) +12. 8-3...4-1 (0.5) +13. 3-1...2-6 (0.4) +14. 6-5...7-5 (0.4) +15. 8-6...2-3 (0.4) +16. 1-3...7-2 (2.0) +17. 8-7...2-2 (0.2) +18. 8-2...2-4 (0.3) +19. 2-1...7-7 (0.1) +20. 1-4...1-5 (0.3) +21. 1-6...2-5 (0.2) +22. 8-1...1-2 (0.1) +23. 1-1...Forfeit +24. 3-7...2-7 (0.1) +25. 2-8...1-7 (0.1) +26. 1-8...4-8 (0.1) +27. 8-8...7-8 (4.0) +28. 6-8...6-7 (1.1) +29. 5-8...4-6 (0.1) +30. 3-8...Forfeit +31. 3-6...4-7 (0.1) +32. 5-7 +53-11 + RSP Nov 14 1977 23:49:19 + +1. 3-5...3-6 (0.2) +2. 4-6...3-4 (0.2) +3. 4-3...5-6 (1.3) +4. 6-4...5-3 (0.4) +5. 6-3...6-2 (0.4) +6. 6-1...7-5 (0.5) +7. 6-5...7-4 (0.4) +8. 6-6...7-3 (0.6) +9. 3-3...4-2 (0.7) +10. 5-1...3-1 (0.7) +11. 5-2...6-7 (0.8) +12. 8-3...3-2 (0.6) +13. 8-4...7-2 (0.2) +14. 7-1...Forfeit +15. 8-5...8-6 (0.2) +16. 8-7...7-6 (0.1) +17. 6-8...5-7 (0.3) +18. 5-8...4-8 (0.3) +19. 3-8...4-7 (0.2) +20. 3-7...7-8 (1.2) +21. 8-8...2-7 (1.5) +22. 2-8...Forfeit +23. 8-1...8-2 (0.1) +24. 7-7...Forfeit +25. 1-8...2-6 (0.1) +26. 1-5...1-6 (0.2) +27. 1-7...2-5 (3.3) +28. 1-4...Forfeit +29. 4-1...Forfeit +30. 2-4...2-2 (0.4) +31. 1-1...1-2 (0.2) +32. 2-1...2-3 (0.1) +33. 1-3 +59-5 +  \ No newline at end of file diff --git a/src/as/o/o8.rel b/src/as/o/o8.rel new file mode 100644 index 0000000000000000000000000000000000000000..d06255e2e7e8eabc8e09300faa1068d31773ddfb GIT binary patch literal 19595 zcma)^4U8StmFI8O`*y$A{rbb*&DYS54K%oI+7Lox3~pnHO~A_w7%;&&MPrg?fVhn@ zZkrBF#Ih(t*=#0@vZE+s5t@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CC|N7pakHwXZ^6 zg#0z+n=p1$dl^DP>A%s3QhSKo8M|wr`Y#{w)LRFk|FF~!h*diTc^rF$-(VK4U;tMz zfGf^7ZE6=~H70%IYzW*2b8N*9YHLNTG}h5}pX!Y(tbtnwuR%68t`mOe@hhu3tD2#^ z;tPm8XSX7a9o)V^jV;MagMDemcOWmTp<(8;@Vy8_+hAs`_ysi}Ze$tS_^fWbB5}KF z)Qrrl777d^>gtz&#c!P`H|sCYz{~&omPDd2%{(xD$AlX$>x6yk4{iO0uZq?9TVHAI zgwDKCFssY)L;Id_Tbj<*KmCv>rLg|OrZd2{ZI4H+$;H=fFfd#pu5a_TC|<)xsuERt uHhyfi8&S1*L}ygF;(FrS{r=(NKm79}2cLH%I+t4?|GuYmTz_*+<^KX3Fv|1* literal 0 HcmV?d00001 diff --git a/src/as/o/ob.h b/src/as/o/ob.h new file mode 100644 index 00000000..4cd96bae --- /dev/null +++ b/src/as/o/ob.h @@ -0,0 +1,68 @@ +#define MAXEXIT 12 +#define MAXNODE 2200 +#define NOT_EVAL -1000 +#include "o.h" + +typedef int rotation; + +struct _exit { + int data; + + /* encoded as follows: + + bit 23:17 - position + bit 16 - goodness flag + bit 15:4 - next bnode (number) + bit 3:0 - rotation factor for viewing next node + */ + + }; + +#define getpos(e) (((e)->data>>17) & 0177) +#define getnext(e) (((e)->data>>4) & 07777) +#define getgood(e) (((e)->data>>16) & 01) +#define getrot(e) ((e)->data & 017) + +#define consexit(e,pos,good,rot,next)((e)->data=((((((pos<<1)|good)<<12)|next)<<4)|rot)) +#define setgood(e) ((e)->data =| (1<<16)) + +struct _bnode { + int nodenum; /* node number - for identification */ + int nmoves; /* number of exiting moves */ + +# ifdef GENBOOK + int eval; /* evaluation (NOT_EVAL if not evalled) */ + int depth; /* depth of node in search tree */ + board b; /* current position */ + color c; /* side to move */ +# endif + + struct _exit moves[MAXEXIT]; /* the exits */ + /* must be last */ + }; + +typedef struct _exit exit; +typedef struct _bnode bnode; + +# define R0 0 +# define R90 1 +# define R180 2 +# define R270 3 +# define H0 4 +# define H90 5 +# define H180 6 +# define H270 7 +# define V0 8 +# define V90 9 +# define V180 10 +# define V270 11 + +extern bnode *bnlist[MAXNODE]; +extern bnode *curbn; +extern bnode *bnfind(); +extern rotation currot; +extern int nnodes; +extern position movlst[]; + +# define forallpos(p,pp) for(pp=movlst;(p = *pp++)>=0;) + \ No newline at end of file diff --git a/src/as/o/ob1.c b/src/as/o/ob1.c new file mode 100644 index 00000000..0d675c5b --- /dev/null +++ b/src/as/o/ob1.c @@ -0,0 +1,613 @@ +#define GENBOOK 1 +#include "ob.h" + +/********************************************************************** + + bk_read (fd) read book from file + bk_write (fd) write book to file + bk_parse (fd) read book in readable form + bk_print (fd) print book in readable form + bk_clear (c) reset to beginning of game + bk_move (p) make move at p + bk_lookup (t, tp) -> k return current book move(s) + + bk_grow (n) grow n nodes + bn_grow (b) grow successors to node b + +**********************************************************************/ + +bnode *bnlist[MAXNODE]; +int nnodes 0; +extern bnode *curbn; +extern rotation currot; +int book[]; + +bnode *bnfind(), *extrace(); +position rotate(); + +position movlst[] { + pos(3,3), pos(3,4), pos(4,3), pos(4,4), + pos(2,3), pos(2,4), pos(3,2), pos(3,5), + pos(4,2), pos(4,5), pos(5,3), pos(5,4), + pos(7,3), pos(7,4), pos(7,5), pos(7,6), + pos(2,2), pos(2,5), pos(5,2), pos(5,5), + pos(0,0), pos(0,7), pos(7,0), pos(7,7), + pos(0,1), pos(0,2), pos(0,3), pos(0,4), + pos(0,5), pos(0,6), pos(1,0), pos(1,7), + pos(2,0), pos(2,7), pos(3,0), pos(3,7), + pos(4,0), pos(4,7), pos(5,0), pos(5,7), + pos(6,0), pos(6,7), pos(7,1), pos(7,2), + pos(1,2), pos(1,3), pos(1,4), pos(1,5), + pos(2,1), pos(2,6), pos(3,1), pos(3,6), + pos(4,1), pos(4,6), pos(5,1), pos(5,6), + pos(6,2), pos(6,3), pos(6,4), pos(6,5), + pos(1,1), pos(1,6), pos(6,1), pos(6,6), + -1 + }; + +bnode *bnalloc () + + {return (calloc (sizeof (*curbn)/sizeof (0)));} + +bnode *bntrim (bn) + bnode *bn; + + {bnode *nn; + int save, sz, *d, *s; + if (bn->nmoves == MAXEXIT) return (bn); + sz = sizeof (bn->moves[0]); + save = sz * (MAXEXIT - bn->nmoves); + sz = ((sizeof (*curbn) - save)/sizeof(0)); + nn = calloc (sz); + s = bn; + d = nn; + while (--sz >= 0) *d++ = *s++; + bnlist[nn->nodenum] = nn; + cfree (bn); + return (nn); + } + +bnode *bnexpand (bn) + bnode *bn; + + {bnode *nn; + int save, sz, *d, *s; + if (bn->nmoves == MAXEXIT) return (bn); + sz = sizeof (bn->moves[0]); + save = sz * (MAXEXIT - bn->nmoves); + sz = ((sizeof (*curbn) - save)/sizeof(0)); + nn = calloc (sizeof (*curbn)/sizeof(0)); + s = bn; + d = nn; + while (--sz >= 0) *d++ = *s++; + bnlist[nn->nodenum] = nn; + cfree (bn); + return (nn); + } + +bnode *bnuniq (b, pr) + bnode *b; + rotation *pr; + + {int i; + *pr = R0; + for (i=1;i<=nnodes;++i) + {bnode *ob; + ob = bnlist[i]; + if (ob == b) return (ob); + if (ob) + {rotation r; + if ((r = bncompare (b, ob)) >= 0) + {*pr = r; + cfree (b); + return (ob); + } + } + } + b->nodenum = ++nnodes; + bnlist[nnodes] = b; + return (bntrim (b)); + } + +rotation bncompare (b1, b2) + bnode *b1, *b2; + + {rotation r; + int *bd1, *bd2; + if (b1->c != b2->c) return (-1); + bd1 = b1->b; + bd2 = b2->b; + if (bscore (bd1, WHITE) != bscore (bd2, WHITE)) return (-1); + if (bscore (bd1, BLACK) != bscore (bd2, BLACK)) return (-1); + for (r=0;r<12;++r) if (brcomp (bd1, bd2, r)) return (r); + return (-1); + } + +int brcomp (b1, b2, r) + board b1, b2; + rotation r; + + {position p, *pp; + forallpos (p, pp) + if (b1[p] != b2[rotate(p,r)]) return (FALSE); + return (TRUE); + } + +# ifdef GENBOOK + +/********************************************************************** + + bk_grow + +**********************************************************************/ + +bk_grow (n) + + {int depth, count; + if (nnodes == 0) + {int i; + bnode *b; + b = bnalloc (); + clrbrd (b->b); + b->c = BLACK; + b->nmoves = 0; + b->depth = 1; + b->eval = NOT_EVAL; + bnuniq (b, &i); + } + depth = 1; + count = 0; + show (count); + while (TRUE) + {int i; + bnode *b; + for (i=1;i<=nnodes;++i) + {b = bnlist[i]; + if (b && b->depth == depth && b->nmoves == 0) + {bn_grow (b); + ++count; + show (count); + if (count >= n) return; + if ((count%10)==0) savbook (); + } + } + if (count == 0 && depth == 12) return; + ++depth; + } + } + +bk_eval (n) + + {int i, count; + + count = 0; + show (count); + for (i=1;i<=nnodes;++i) + {bnode *b; + b = bnfind (i); + if (b && b->eval == NOT_EVAL && b->nmoves==0) + {b->eval = geval (b->b, b->c); + ++count; + show (count); + if (count >= n) return; + if ((count%10)==0) savbook (); + } + } + } + +bk_clean () + + {int i; + + for (i=1;i<=nnodes;++i) + {bnode *b; + b = bnfind (i); + if (b) b->eval = NOT_EVAL; + } + } + +# endif + +static int wrcount; + +bk_write (fd) + int fd; + + {int i, maxn, o[MAXNODE]; + maxn = 0; + wrcount = 1; + cprint (fd, "int book[] {0, "); + for (i=1;i<=nnodes;++i) + {bnode *bn; + o[i] = wrcount; + bn = bnfind (i); + if (bn && bn->nmoves>0) + {bn_write (bn, fd); + maxn = i; + } + } + cprint (fd, "};\nint *bnlist[] {0, "); + for (i=1;i<=maxn;++i) + {bnode *bn; + bn = bnfind (i); + if (bn && bn->nmoves>0) + cprint (fd, "%d", o[i]); + else cprint (fd, "0"); + if (i < maxn) + {if ((i%10) == 0) cprint (fd, ",\n"); + else cprint (fd, ", "); + } + } + cprint (fd, "};\n"); + cprint (fd, "int nnodes {%d};\n", maxn); + } + +bn_write (bn, fd) + bnode *bn; + + {int i; + + cprint (fd, "%d, %d", bn->nodenum, bn->nmoves); + wrcount =+ 2; + for (i=0;inmoves;++i) + {exit *e, temp; + bnode *b; + int next, sz, *p; + e = &bn->moves[i]; + next = getnext(e); + b = bnfind (next); + if (!b || b->nmoves == 0) next = 0; + {position ep; + rotation er; + int eg; + ep = getpos (e); + er = getrot (e); + eg = getgood (e); + consexit (&temp, ep, eg, er, next); + } + p = &temp; + sz = sizeof(temp)/sizeof(0); + while (--sz >= 0) + {cprint (fd, ", %d", *p++); + ++wrcount; + } + } + cprint (fd, ",\n"); + } + +bk_print (fd) + int fd; + + {int i; + for (i=1;i<=nnodes;++i) + {bnode *bn; + bn = bnfind (i); + if (bn) bn_print (bn, fd); + } + } + +bn_print (b, fd) + bnode *b; + + {int j, nmoves; +#ifdef GENBOOK + if (b->depth==0) return; +#endif + cprint (fd, "%3d: ", b->nodenum); + j = b->eval; + if (j != NOT_EVAL) + cprint (fd, "[%d] ", j); + nmoves = b->nmoves; + for (j=0;jmoves[j]; + cprint (fd, " "); + prpos (getpos(e), fd); + if (getrot(e) != R0) + {cprint (fd, " "); + prrot (getrot(e), fd); + } + cprint (fd, " %d", getnext(e)); + if (getgood(e)) cprint (fd, "g"); + if (jnodenum = bnum; + if (bnum > nnodes) nnodes = bnum; + bnlist[bnum] = b; + b->nmoves = 0; + b->eval = NOT_EVAL; +# ifdef GENBOOK + b->depth = 0; + b->c = EMPTY; +# endif + if (scanc (fd, ':') == FALSE) return (FALSE); + if (scanc (fd, '[')) + {b->eval = scani (fd); + scanc (fd, ']'); + } + i = 0; + while (bkpex (fd, b, i)) ++i; + bntrim (b); + return (TRUE); + } + +/********************************************************************** + + parse exit + +**********************************************************************/ + +int bkpex (fd, b, i) + int fd; + bnode *b; + int i; + + {position p; + rotation r; + int bnnum; + + p = scanpos (fd); + if (p>=0) + {r = scanrot (fd); + bnnum = scani (fd); + if (bnnum>=0) + {int good; + good = scanc (fd, 'g'); + consexit (&b->moves[i],p,good,r,bnnum); + ++b->nmoves; + if (scanc (fd, ',')) return (TRUE); + } + } + skipc (fd, ';'); + return (FALSE); + } + +/********************************************************************** + + skipc - skip to a character + +**********************************************************************/ + +skipc (fd, match) + int fd; + char match; + + {int c; + while (TRUE) + {c = cgetc (fd); + if (c <= 0 && ceof (fd)) return; + if (c == match) return; + } + } + +/********************************************************************** + + scanc - scan for a character + +**********************************************************************/ + +int scanc (fd, match) + int fd; + char match; + + {int c; + c = skipb (fd); + if (c==match) return (TRUE); + ungetc (c, fd); + return (FALSE); + } + +/********************************************************************** + + skipb - skip blanks + +**********************************************************************/ + +int skipb (fd) + + {int c; + while (TRUE) + {c = cgetc (fd); + if (c<=0 && ceof(fd)) return (0); + if (c==' ' || c=='\t' || c=='\n') continue; + return (c); + } + } + +/********************************************************************** + + skipw - skip a word and its terminator + +**********************************************************************/ + +skipw (fd) + + {int c; + while (TRUE) + {c = cgetc (fd); + if (c<=0 && ceof(fd)) return; + if (c==' ' || c=='\t' || c=='\n') return; + } + } + +/********************************************************************** + + scani - read an integer + +**********************************************************************/ + +int scani (fd) + int fd; + + {int c, sum, negflag; + sum = -1; + + negflag = FALSE; + c = skipb (fd); + if (c == '-') + {negflag = TRUE; + c = cgetc (fd); + } + if (c >= '0' && c <= '9') + {sum = 0; + while (c >= '0' && c <= '9') + {sum = (sum * 10) + c-'0'; + c = cgetc (fd); + } + if (negflag) sum = -sum; + } + if (c > 0) ungetc (c, fd); + return (sum); + } + +position scanpos (fd) + int fd; + + {int x, y; + if (scanc (fd, 'f')) + {skipw (fd); + return (0); + } + x = scani (fd); + if (x<0) return (-1); + if (scanc (fd, '-') == FALSE) return (-1); + y = scani (fd); + if (y<0) return (-1); + return (pos (x-1, y-1)); + } + +prpos (p, fd) + position p; + + {if (p==0) cprint (fd, "forfeit"); + else cprint (fd, "%d-%d",posx(p)+1,posy(p)+1); + } + +rotation scanrot (fd) + int fd; + + {if (scanc (fd, 'r')) + return (scani (fd)/90); + if (scanc (fd, 'h')) + return (4 + scani (fd)/90); + if (scanc (fd, 'v')) + return (8 + scani (fd)/90); + return (0); + } + +prrot (r, fd) + rotation r; + + {switch (r/4) { + case 0: cprint (fd, "r"); break; + case 1: cprint (fd, "h"); break; + case 2: cprint (fd, "v"); break; + } + cprint (fd, "%d", 90*(r%4)); + } + +# ifdef GENBOOK + +/********************************************************************** + + bn_grow (b) + +**********************************************************************/ + +bn_grow (b) + bnode *b; + + {position p, *pp; + if (b->nmoves > 0) return; + b = bnexpand (b); + forallpos (p, pp) if (!adjcorner(p) && ismove (b->b, b->c, p)) + {bnode *nb; + rotation r; + if (b->nmoves == MAXEXIT) + {cprint ("Node %d too many exits.\n", b->nodenum); + return; + } + nb = bnalloc (); + nb->depth = b->depth + 1; + nb->c = oppcolor (b->c); + nb->nmoves = 0; + nb->eval = NOT_EVAL; + cpybrd (nb->b, b->b); + putmov (nb->b, b->c, p); + nb = bnuniq (nb, &r); + consexit (&b->moves[b->nmoves],p,FALSE,r,nb->nodenum); + ++b->nmoves; + } + bntrim (b); + } + +bkfixup () + + {board b; + clrbrd (b); + bkfxnode (bnfind (1), 1, b, BLACK); + } + +bkfxnode (bn, depth, b, c) + bnode *bn; + board b; + color c; + + {int i; + color o; + if (bn == 0) return; + if (bn->c != EMPTY) return; + if (bn->depth != 0) return; + bn->c = c; + bn->depth = depth; + cpybrd (bn->b, b); + ++depth; + o = oppcolor (c); + i = bn->nmoves; + while (--i >= 0) if (getrot(&bn->moves[i]) == R0) + {board a; + position p; + bnode *next; + p = getpos (&bn->moves[i]); + if (!ismove (b, c, p)) + {cprint ("Node %d move at "); + prpos (p); + cprint (" is not legal.\n"); + return; + } + cpybrd (a, b); + putmov (a, c, p); + next = extrace (bn, i); + bkfxnode (next, depth, a, o); + } + } + +# endif + \ No newline at end of file diff --git a/src/as/o/ob1.rel b/src/as/o/ob1.rel new file mode 100644 index 0000000000000000000000000000000000000000..018dc7244d8c44862875941d7c866de4aa5d0420 GIT binary patch literal 13393 zcmb7L3vg7|c|P~Ct5pTkg09RWE#e|!UIGDnfC(5@FN8oyLgE!0f&>x*gFv=~1OntG zBvmuSA*sjXGOkm5GI2wk#&H~vlW|=;({U1~@uZ$4(|A&XT~C7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w zmYG#G-?oXb$jUKiP>O_07cB{SIaugecO3XS_L3^MvP;iVidKrc_WMYs4S)LmU%ryS z*V+;SpNb$Ljz-v9x3W*Kq7=2t3S*B0$^g<6c-adJ!82_iZ-EqIZtZHNJXoVG1uHg= zavYcXY8|N4fChIHsB58h5u8A<5UuJXD`)3DqGb*2QfW&F!I$Yabt~(9c-?_g!H2rV zQdf~xokc7uY7T5r%)ZffP@5v8j&h769AjTr&Gy5>S72qIgJZ-7Ir7~o-i}(?_qVdI z)`4-IRH&?ZC9UK$d#rHwMz-oNTHzygtTT32gi4pAjuRlKwov*G9joogpO>&-kBng! zS~+PFo!Sdl_NsL9sdufM2cS4S(^L^!XM>`3!)>$oakO?TXKRU!CNYUmlnwo9D;%nn zI#{>OA0~n-P&4p7p`0V{m4nRV(iynl#{l7`L@pH9CGo})aB+uB70^mJ=Sm=yfm zdYG;1Z7X{jyW(p%)HUy8T?ME<`a?eqs(TBmMbzjxT8&qS|NGq+@)P!J`xs%2Qy%zE zECI#XZBwLMAxF=(2M3 z*`n`N=yuMQ2!oW_61$Irnz4j@H_+M;VP7BW{2a~LeCz)6`>rJLwRRA*b^%!0Ye|)Y zY9SVN*$O`d)qp-92#z*W3jEu>OzIxUs?M>9Ac{0z6c8+%DnhI2L5!AFRgh)V3yqNX zA=vaG5N8Na-vz2mjByB5hnRrwJ$wX%sUs(=nhW}q@S1@DUnOQ$@82SWm1b3ENRUJe zvbNqM!$$XG8f7$>eIs4gt}s>tE>pEXYNLbLk&&#wpTN%x*eYA$&V&(Y#kb-Y2thxIr Z83DGxH59Jq<$|+ixxN1@{}Pwq{{Y5V*3JL` literal 0 HcmV?d00001 diff --git a/src/as/o/ob2.c b/src/as/o/ob2.c new file mode 100644 index 00000000..23f19ed6 --- /dev/null +++ b/src/as/o/ob2.c @@ -0,0 +1,107 @@ +#define GENBOOK 1 +#include "ob.h" + +int gmdepth 0; +int gmmdepth 4; + +int geval (b,c) + board b; + color c; + + {color o; + o = oppcolor (c); + return (gmeval (b,c,o)); + } + +int gmeval (b,c,o) + board b; + color c, o; + + {int myscore; + if (++gmdepth == gmmdepth) myscore = gseval (b,c); + else + {register position *pp, p; + myscore = -1000; + forallpos (p, pp) if (ismove (b,c,p)) + {register int temp; + board a; + cpybrd (a,b); + putmov (a,c,p); + temp = -gmeval(a,o,c); + if (temp>myscore) myscore=temp; + } + } + --gmdepth; + return (myscore); + } + +gseval (b, c) + board b; + color c; + + {color o; + position p, *pp; + int nmymoves, nopmoves, s, myscore; + + o = oppcolor (c); + s = -1; + nopmoves = nmymoves = 0; + forallpos (p, pp) + {if (ismove (b,c,p)) + {register int temp; + temp = sqeval (b,c,o,p); + if (temp > 2 && temp != 5) /* count only good moves */ + {++nmymoves; + if (edge (p)) nmymoves=+2; /* count edges higher */ + } + } + if (ismove (b,o,p)) + {register int temp; + temp = sqeval (b,o,c,p); + if (temp > 2 && temp != 5) /* count only good moves */ + {++nopmoves; + if (edge (p)) nopmoves=+2; /* count edges higher */ + } + if (temp>s) {s=temp;} + } + } + myscore = nmymoves-nopmoves; + if (nmymoves<6) myscore =- (6-nmymoves)*2; + if (nopmoves<6) myscore =+ (6-nopmoves)*2; + if (s == CORNERVALUE) myscore =- 100; + return (myscore); + } + +bkminimax () + + {bkmxnode (bnfind (1)); + } + +bkmxnode (bn) + bnode *bn; + + {int i, myscore; + if (bn == 0) return; + i = bn->nmoves; + if (i == 0) return; + myscore = NOT_EVAL; + while (--i >= 0) + {bnode *next; + int temp; + next = extrace (bn, i); + bkmxnode (next); + temp = -(next->eval); + if (temp > myscore) myscore = temp; + } + bn->eval = myscore; + i = bn->nmoves; + while (--i >= 0) + {bnode *next; + int temp; + next = extrace (bn, i); + temp = -(next->eval); + if (temp == myscore) setgood (&bn->moves[i]); + } + } + + \ No newline at end of file diff --git a/src/as/o/ob2.rel b/src/as/o/ob2.rel new file mode 100644 index 0000000000000000000000000000000000000000..df07c7f84eae3152fc6d5814a3b98172c3613ab6 GIT binary patch literal 2399 zcmZ8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KQl1N8rc+RVXb zSm}zg*$1GfK1zS9J#s-zL1Ni;cE#Fy zaClGZi7toO_-KYo?m{_#eQQ?cJ5N1!$|b&ZHPU;(?h-}CwiR7^+O`&-rRaCPUFg-= zx>a0`MqS>UfB}YjCd5nxMft5@SE2xw?F5SJ={X%T9>7h6t3nuW5Y6S6{@wn{JB0U? zgYE7t9@3a2a#hQFM|>I@qpJUjFg8}ZRj4^f&}LncX{41o#%-i3A><^KbqchTSL00s zn$l{kivLLM+ziL#Yl$TQ`SugMI9lx$cSm8cAzo&?ZcWDW8MIp@4ea&UD9oVV$IODA zQA^S8276)Zg_H=OteAEucnlk&ykS@Di56xrQ^4>Th0XF+76#4hh=tKQd<_ef`-CsJ zJl<`K8W-4H-90~*Z=#=N(hY{qv})5AFLLHFo;TzBau;E#;%2$DhsJtiBLHS<3lN&3 z!SV1C;#~3y(0MHy%x3WtjeP`TcML6h%K&D*RH;)Nn5EdE8|}A^Ex_U*7fg>HyDI>K z9Y>=wh?JQgE{oyj5ohvDA=+U&Aww>?XtcR(?=R;v+;Ub>NHj0~1s#!HDVq`^heyZz z#`mikj6yX(a8~oDfr9>i3I>J-$3k*+Y>Y49B@aG6IHIQp$HUju(Eh%|{1!pJARQQb z_@M`=H#`yQfj2xlK~MXSj34exReY+cq0!NU506Q5WMFXQ`ll`Lz9Ifv;fJA!BKTph zIR8Z82IKKl%hfsY3RB~$*-Js<_oTQ`tU%njc9EEr+>rp^!)lQua{0OwQw zy}SnTcuid%{-QDk>6AiX*og5 dXT8QpsfS`EpZ42h5+G1*gQdrQ_jy^L{{di5PZa= 0) + {int temp; + temp = y; + y = 7 - x; + x = temp; + } + return (pos (x, y)); + } + +rotation rotadd (r1, r2) + rotation r1, r2; + + {int flip1, flip2; + + if (r1 == R0) return (r2); + if (r2 == R0) return (r1); + flip1 = r1 / 4; + r1 = r1 % 4; + flip2 = r2 / 4; + r2 = r2 % 4; + if (flip2==0) + return (flip1*4 + ((r1 + r2) % 4)); + if ((r1 % 2) != 0) flip2 = oppflip (flip2); + return (rotadd (flipadd (flip1, flip2), (r1 + r2) % 4)); + } + +rotation flipadd (f1, f2) + + {if (f1 == f2) return (R0); + if (f1 == 0) return (f2*4); + if (f2 == 0) return (f1*4); + return (R180); + } + +int oppflip (f1) + + {if (f1 == 0) return (0); + return (3 - f1); + } + +/********************************************************************** + + bk_clear + +**********************************************************************/ + +bk_init () + + {int i; + extern int book[]; + for (i=1;imoves[n]), currot));} + +bk_move (p) + + {bnode *extrace (); + if (curbn) + {int n; + n = curbn->nmoves; + while (--n >= 0) + {if (p == bkmvn (n)) + {currot = rotadd (getrot (&curbn->moves[n]), currot); + curbn = extrace (curbn, n); + return; + } + } + curbn = 0; + } + } + +bnode *extrace (bn, n) + bnode *bn; + + {return (bnfind (getnext (&bn->moves[n]))); + } + +int bk_lookup (t, tp) + struct mt t[64], *tp[64]; + + {int n, k; + if (curbn == 0) return (0); + + k = 0; + n = curbn->nmoves; + while (--n >= 0) + {if (getgood (&curbn->moves[n])) + {t[k].p = bkmvn (n); + tp[k] = &t[k]; + ++k; + } + } + return (k); + } + +bnode *bnfind (n) + + {if (n>0 && n<=nnodes) return (bnlist[n]); + return (0); + } + + \ No newline at end of file diff --git a/src/as/o/obktst.c b/src/as/o/obktst.c new file mode 100644 index 00000000..6bb9de6e --- /dev/null +++ b/src/as/o/obktst.c @@ -0,0 +1,191 @@ +#include "o.h" +#include "c/c.defs" +int eflag 0, debug 0, endgame 0, stdout, printf, fprintf; +int movnum 15; +int mvnhack 1; +int handicap 0; + +#define USNAME 016 +static int oldsname; +extern int cin, cout; + +main () + + {oldsname = rsuset (USNAME); + rdbook ("book"); + while (TRUE) docommand (); + } + +rdbook (s) + char *s; + + {int fd; + fd = xopen (s, 'r'); + if (fd <= 0) return; + bk_parse (fd); + cclose (fd); + } + +int xopen (fname, mode) + char *fname; + + {int fd, temp; + temp = rsuset (USNAME); + wsuset (USNAME, oldsname); + fd = copen (fname, mode); + wsuset (USNAME, temp); + return (fd); + } + +int xdelete (fname) + char *fname; + + {int temp; + temp = rsuset (USNAME); + wsuset (USNAME, oldsname); + delete (fname); + wsuset (USNAME, temp); + } + +savbook () + + {int fd, n; + filespec fs; + char *itoa (); + static char fnbuf[20] {'b', 'o', 'o', 'k', '.'}; + + fd = xopen ("book", 'w'); + if (fd <= 0) {cprint ("Can't save book.\n"); cexit ();} + filnam (itschan (fd), &fs); + c6tos (fs.fn2, fnbuf+5); + n = atoi (fnbuf+5); + bk_print (fd); + cclose (fd); + n = n - 4; + itoa (n, fnbuf+5); + xdelete (fnbuf); + } + +docommand () + + {int c; + putchar ('%'); + c = utyi (); + switch (c) { + case 'g': cprint ("Grow tree\n"); dogrow (); break; + case 'e': cprint ("Evaluate\n"); doeval (); break; + case 'f': cprint ("Flush evaluations\n"); doflush (); break; + case 'm': cprint ("Minimax\n"); bkminimax(); break; + case 't': cprint ("Test moves\n"); testmoves(); return; + case 'w': cprint ("Write tree\n"); dowrite(); return; + default: putchar ('?'); return; + } + savbook (); + } + +dowrite () + + {int fd; + fd = xopen ("cbook", 'w'); + if (fd != OPENLOSS) + {bk_write (fd); + cclose (fd); + } + else cprint ("Cant write file\n"); + } + +dogrow () + + {int n; + cprint ("Enter number of leaf nodes to grow: "); + n = scani (cin); + if (n<=0) return; + bk_grow (n); + } + +doeval () + + {int n; + cprint ("Enter number of leaf nodes to evaluate: "); + n = scani (cin); + if (n<=0) return; + bk_eval (n); + } + +doflush () + + {bk_clean (); + } + +show (n) + + {char buf[20]; + int fd, w; + + fd = copen (buf, 'w', "s"); + cprint (fd, "%d", n); + cclose (fd); + w = csto6 (buf); + wsuset (USNAME, w); + } + +testmoves () + + {cprint ("Black moving first:\n"); + bk_clear (BLACK); + tmoves (BLACK); + cprint ("White moving first:\n"); + bk_clear (WHITE); + tmoves (WHITE); + } + +tmoves (c) + color c; + + {while (TRUE) + {position p; + struct mt t[64], *tp[64]; + int k, i; + + k = bk_lookup (t, tp); + if (k == 0) + {cprint ("Book has no moves.\n"); + return; + } + if (c==BLACK) cprint ("Moves for * are: "); + else cprint ("Moves for @ are: "); + for (i=0;ip; + cprint (" "); + prpos (p, cout); + cprint (","); + } + cprint ("\n"); + cprint ("Move: "); + p = scanpos (cin); + if (p < 0 || p > 100) return; + bk_move (p); + c = oppcolor (c); + } + } + +atoi (s) +char *s; + + {int n, c; + n = 0; + while (c = *s++) n = (n * 10) + (c - '0'); + return (n); + } + +char *itoa (n, s) +char *s; + + {int a; + if (n<0) n=0; + if (a = (n / 10)) s = itoa (a, s); + *s++ = '0' + n%10; + *s = 0; + return (s); + } + \ No newline at end of file diff --git a/src/as/o/obktst.rel b/src/as/o/obktst.rel new file mode 100644 index 0000000000000000000000000000000000000000..7c4b7a8e9e497f5c80538ee470f6fd46eb07d2bb GIT binary patch literal 6454 zcmb7IdrVu`89&DcV?+Tbv4b(M8)g+M5wB@jX=p@F0Unh zRxFw}R&CRyOol zN@nDG#ve<8k&zki$fOV^AtKl98I8b+$n=+2zX*ex{fo1Ku#f~ioxITsHmS?sIP%*Y z;4nvS9Ba4+Ayee~v%?uubrbaJ z6rg@`lERqja3^4TAu@d{^EE(+bHv&BGT6NqnK`i-Ae=Pc{&=LnLpUjEgPFvy@<4vB zPKG`;GRM=BuA$}w!s#MeW;U|9oc_D-kAyABLNdWfZ(lFv}i5 zJ@gYc46Br4DnQk}#Vr1F>xd(4xfsmAOn<;Zr5BwvpTlOgdR}YPCS_P2RI)< z_JaM{1>AWIJgvHi*k(vj&(dQspTn$-+_NKl$~}&j&EDTcA2ji*<#e$+s1&-lp!zZN z0mm#XF#sGpx)%f$+Jl&~dmK3HtBNi?J4_vVF?g7%7}!77!p8M#Kq*To!kM6w5* zS6w{_HVogLYv}6+%Xe0nRe30V>ybW{TMn%PqN;bex~p7)cFr(+QHm-12r0qkWU7kA z2ZFBDkgWuc6>xITW6Dkq0ARm+KDQ2=k-bTv_|c`HgtJ!)BrDO)g1`|d0&8bx@QM(fyYQvvA~k(1sSa!R~Gau7n8~He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ib +l blt +l ismove +l o2 +l o3 +l o4 +l o5 +l obktst +l ob1 +l ob2 +l ob3 +o ts obktst diff --git a/src/as/o/oprint.c b/src/as/o/oprint.c new file mode 100644 index 00000000..a1936578 --- /dev/null +++ b/src/as/o/oprint.c @@ -0,0 +1,167 @@ +# include "o.h" + +int movnum; + +# define FORFEIT 1000 +# define NOMOVE 1001 +# define ILLEGAL 1002 + +main (argc, argv) + char *argv[]; + + {char *infn, *outfn; + int in, out; + ++argv; + --argc; + if (argc != 2) + {puts ("Usage: oprint in.file out.file"); + return; + } + infn = argv[0]; + outfn = argv[1]; + in = copen (infn, 'r'); + if (in == -1) + {cprint ("Can't open input: %s\n", infn); + return; + } + out = copen (outfn, 'w'); + if (out == -1) + {cprint ("Can't open output: %s\n", outfn); + return; + } + oprint (in, out); + cclose (in); + cclose (out); + } + +oprint (in, out) + + {board b; + + clrbrd (b); + movnum = 1; + while (domove (b, in, out)); + op_score (b, out); + } + +domove (b, in, out) + board b; + + {position p1, p2; + board b1; + + rmovnum (in); + p1 = doply (b, in, BLACK); + if (p1 == ILLEGAL) return (0); + cpybrd (b1, b); + if (p1 < FORFEIT) putmov (b1, BLACK, p1); + p2 = doply (b1, in, WHITE); + if (p2 == ILLEGAL) return (0); + prbrds (b, b1, out); + prmvs (p1, p2, out); + cpybrd (b,b1); + if (p2 < FORFEIT) putmov (b, WHITE, p2); + ++movnum; + return (p2 != NOMOVE); + } + +position doply (b, in, cc) + board b; + color cc; + + {int c; + position p; + + p = ILLEGAL; + c = cgetc (in); + if (c <= 0) return (NOMOVE); + while (c == ' ' || c == '\t') c = cgetc (in); + if (c == 'F' && !anymvs (b, cc)) p = FORFEIT; + else if (c == '.' && movnum == 1 && cc == BLACK) p = NOMOVE; + else if (c >= '1' && c <= '8') + {int x, y; + x = c - '1'; + c = cgetc (in); + if (c == '-') + {c = cgetc (in); + if (c >= '1' && c <= '8') + {position p1; + y = c - '1'; + p1 = pos (x, y); + if (ismove (b, cc, p1)) p = p1; + } + } + } + while (c != ' ' && c != '\n' && c) + {if (c == '.') + {cgetc (in); + cgetc (in); + break; + } + c = cgetc (in); + } + if (c == '\n' && cc == BLACK) ungetc (0, in); + if (p == ILLEGAL) cprint ("Move %d is illegal.\n", movnum); + return (p); + } + +prbrds (b, b1, out) + board b, b1; + + {int x, y; + cprint (out, " 1 2 3 4 5 6 7 8\t 1 2 3 4 5 6 7 8\n"); + for (x=0;x<8;++x) + {cprint (out, "%d", x+1); + for (y=0;y<8;++y) opsq (b,x,y,out); + cprint (out, "\t%d", x+1); + for (y=0;y<8;++y) opsq (b1,x,y,out); + cputc ('\n', out); + } + cputc ('\n', out); + } + +prmvs (p1, p2, out) + position p1, p2; + + {cprint (out, "%d. ", movnum); + prmv (p1, out); + cprint (out, " ... "); + prmv (p2, out); + cputc ('\n', out); + if ((movnum % 5) == 0) cputc ('\p', out); + else cputc ('\n', out); + } + +prmv (p, out) + position p; + + {switch (p) { + case NOMOVE: cprint (out, " "); return; + case FORFEIT: cprint (out, "Forfeit"); return; + case ILLEGAL: return; + } + cprint (out, "%d-%d", posx(p)+1, posy(p)+1); + } + +opsq (b, x, y, out) + board b; + position x, y; + + {register int z; + extern char pcolor[]; + cputc (' ', out); + z = b[pos(x,y)]; + if (z<=2) z = pcolor[z]; + cputc(z,out); + } + +rmovnum (in) + + {int c; + c = cgetc (in); + while (c != ' ' && c != '\t' && c) c = cgetc (in); + } + +op_score (b, out) + {;} + \ No newline at end of file diff --git a/src/as/o/oprint.rel b/src/as/o/oprint.rel new file mode 100644 index 0000000000000000000000000000000000000000..c4b7cc5001145ada6744f347e015bf9ff1bf7b8f GIT binary patch literal 5289 zcma)AeQZ_b8Gp{X?d|Q*_D0Vgx0ljhOIs1zQd%lhKD_O{rBvvLt$>2aZ7md)O10D? z((c5%G$wPn8L}X{Wr@UWXp|VTEX#((Y|%vH{#cg%!}w!~O33Uj^ww0Ycfa3r+H(rg zZ8zcNIq&oJdp_RhJ*N`Rk>1SAH$Pe{VG+s9WH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j1{Ti_nhAdTScwxK}@cAxVA<=Lb5|mcjm<)XTKEMym1XR z>|)p(v?!MVb?`8)TmiKoMZ^0GG#t5Cu$NrJy&OH+1pT9JAn$6gE?{SQ(Ddv(WjkKX#$(Owc%cbI{YOTo86-u463VV{IG%thtm!u2Chwp8?GJx8TknlzbD)}&}#a3iR zl=g(#eG<1E#x1A=fq5(a2SFLN#RGva4>c6Z?%KK{?ciIoIR-IwgtgQrVU&fo{2c_|Sm3qK?VIig=>K>;yq2$J z_*s!Ev=vkE#EwGa6^Xh*+TBI$1JrE-ri7}Rp+q~F@FA2-lFQoP19U$7 t#e;*7{qPBiMU~qfqm_hJ@Nke^Y1)~4`1 && stcmp (argv[1], "-p")) pflag = !pflag; + foreach (addstat); + if (!changed) + {cprint ("No recent statistics.\n"); + rdacc (); + sortuser (); + } + foreach (wsummary); + if (pflag) wfacc (cout, FALSE); + } + +foreach (f) + int (*f)(); + + {int n; + char **p; + n = sizeof(mlist)/sizeof(mlist[0]); + p = mlist; + while (--n >= 0) + (*f)(*p++); + } + +wsummary (s) char *s; + + {char *t, buf[FNSIZE]; + t = stcpy ("/", buf); + t = stcpy (s, t); + stcpy (sumfilename, t); + wfnacc (buf, FALSE); + } + +char stfname[FNSIZE]; + +int wizard () + + {int xuname, option; + xuname = rsuset (UXUNAME); + option = rsuset (UOPTION); + return (!(option & (010000<<18)) & (xuname == csto6 ("AS"))); + } + +addstat (s) char *s; + + {char *t; + t = stcpy ("/", stfname); + t = stcpy (s, t); + stcpy (statfilename, t); + if (yexists ()) /* if YSTAT file exists */ + {apy2o (s); /* append YSTAT file to OSTAT file */ + dely (); /* delete YSTAT file */ + changed = TRUE; + } + if (!xexists ()) /* if XSTAT file doesn't exist */ + {rns2x (); /* rename STAT file to XSTAT */ + if (!xexists ()) /* if XSTAT file doesn't exist */ + return; + } + changed = TRUE; + rdacc (); /* read accumulated stats */ + rdxstat (); /* read XSTAT file - add to acc stats */ + sortuser (); /* sort accumulated stats */ + wfnacc (accfilename, TRUE); /* update accumulated stats */ + rnx2y (); /* rename XSTAT file to YSTAT file */ + apy2o (s); /* print YSTAT and append to OSTAT file */ + dely (); /* delete YSTAT file */ + } + +int xexists () + + {char buf[FNSIZE]; + int fd; + apfname (buf, stfname, "xstat"); + fd = copen (buf, 'r'); + if (fd != OPENLOSS) + {cclose (fd); + return (TRUE); + } + return (FALSE); + } + +int yexists () + + {char buf[FNSIZE]; + int fd; + apfname (buf, stfname, "ystat"); + fd = copen (buf, 'r'); + if (fd != OPENLOSS) + {cclose (fd); + return (TRUE); + } + return (FALSE); + } + +rns2x () + + {char buf[FNSIZE]; + apfname (buf, stfname, "xstat"); + rename (stfname, buf); + } + +rnx2y () + + {char buf1[FNSIZE], buf2[FNSIZE]; + apfname (buf1, stfname, "xstat"); + apfname (buf2, stfname, "ystat"); + rename (buf1, buf2); + } + +rdacc () + + {int fd, rc; + + fd = copen (accfilename, 'r'); + if (fd == OPENLOSS) + {cprint ("Can't read stats file: %s\n", accfilename); + cexit (1); + } + rc = rdfacc (fd); + cclose (fd); + if (rc) + {cprint ("Error in reading stats file: %s\n", accfilename); + cexit (1); + } + } + +rdxstat () + + {int fd, n, unk; + char buf[FNSIZE]; + stat cstat; + + apfname (buf, stfname, "xstat"); + fd = copen (buf, 'r'); + if (fd == OPENLOSS) + {cprint ("Cant open %s\n", buf); + cexit (1); + } + n = 0; + unk = csto6 ("?"); + while (!ceof (fd)) + {++n; + if (rdstat (fd, &cstat)) continue; + if (cstat.name == unk) + cprint ("File %s stat %d unknown user\n", buf, n); + enterstat (&cstat); + } + cclose (fd); + } + +wfnacc (s, full) + + {int fd; + fd = copen (s, 'w'); + if (fd == OPENLOSS) + {if (!full) cprint ("Warning: "); + cprint ("Cant write stats file: %s\n", s); + if (full) cexit (1); + return; + } + wfacc (fd, full); + cclose (fd); + } + +apy2o (s) + char *s; + + {char buf[FNSIZE]; + int fin, fout, c; + + apfname (buf, stfname, "ystat"); + fin = copen (buf, 'r'); + if (fin == OPENLOSS) + {cprint ("Cant read YSTAT file: %s\n", buf); + cexit (1); + } + fout = copen (oldfilename, 'a'); + if (fout == OPENLOSS) + {cprint ("Cant append to OSTAT file: %s\n", buf); + cexit (1); + } + cprint ("\n %s:\n\n", s); + while (c = cgetc (fin)) + {cputc (c, fout); + putchar (c); + } + putchar ('\n'); + cclose (fin); + cclose (fout); + } + +dely () + + {char buf[FNSIZE]; + + apfname (buf, stfname, "ystat"); + delete (buf); + } + +getfield (fd, s, n) + char s[]; + + {char *ebuf; + int c; + + ebuf = s + (n-1); + c = cgetc (fd); + while (c == ' ' || c == '\t') c = cgetc (fd); + while (TRUE) + {if (c == ' ' || c == '\t') + {*s = 0; + return (0); + } + if (c == '\n' || c <= 0) return (1); + if (s < ebuf) *s++ = c; + c = cgetc (fd); + } + return (1); + } + +/********************************************************************** + + GETLINE - Read a line into a buffer. + Return 1 if EOF detected. + +**********************************************************************/ + +getline (fd, s, n) + char *s; + + {return (scan (fd, s, n, '\n'));} + +scan (fd, s, n, tc) char *s; + + {char *ebuf; + int c; + + ebuf = s + (n-1); + while (c = cgetc (fd)) + {if (c == tc) + {*s = 0; + return (0); + } + if (c == '\n') return (1); + if (s < ebuf) *s++ = c; + } + return (1); + } + +int atoi (s) char s[]; + + {int i, sign, c; + + if (!s) return (0); + i = 0; + sign = 1; + while (*s == '-') {++s; sign = -sign;} + while ((c = *s++)>='0' && c<='9') i = i*10 + c-'0'; + if (i<0) + {i = -i; + if (i<0) + if (sign>0) return (-(i+1)); + else return (i); + } + return (sign*i); + } + +rename (s1, s2) char *s1, *s2; + + {filespec f1, f2; + fparse (s1, &f1); + fparse (s2, &f2); + sysrnm (&f1, &f2); + } + +int rd60th (s) + char *s; + + {int sum, done, n; + char *e; + + sum = 0; + e = s; + done = FALSE; + while (!done) + {while (*e != ':' && *e != '.' && *e) ++e; + done = !*e; + *e = 0; + n = atoi (s); + sum = sum * 60 + n; + s = e+1; + e = s; + } + return (sum); + } + +/********************************************************************** + + particular code + +**********************************************************************/ + +sortuser () + + {user *up, *up1; + + for (up=usertab;upwon[i] + up->lost[i]; + totaltotal =+ total; + totalwin =+ up->won[i]; + up->percent[i] = up->won[i]*1000/total; + } + up->totalpercent = totalwin*1000/totaltotal; + } + for (up=usertab;uptotalpercent < up->totalpercent) continue; + if (up1->totalpercent == up->totalpercent) + if (up1->total <= up->total) continue; + sz = sizeof(temp)/sizeof(0); + s = up; d = &temp; n = sz; + while (--n >= 0) *d++ = *s++; + s = up1; d = up; n = sz; + while (--n >= 0) *d++ = *s++; + s = &temp; d = up1; n = sz; + while (--n >= 0) *d++ = *s++; + } + } + +wfacc (fd, full) + + {if (full) wrall (fd); + else wrsum (fd); + } + +wrall (fd) + + {user *up; + + for (up=usertab;upname, buf); + cprint (fd, "%s", buf); + sz = sizeof(*up)/sizeof(0); + p = up; + ++p; --sz; + while (--sz >= 0) cprint (fd, " %d", *p++); + cputc ('\n', fd); + } + } + +wrsum (fd) + + {user *up; + int cutoff, twon, tcheat, tlost, tdrawn, tpercent; + int nuser, spercent; + + cutoff = 4; + twon = tcheat = tlost = tdrawn = nuser = spercent = 0; + cprint (fd, "Othello Statistics as of "); + prcal (&thetime, fd); + cprint (fd, "\n\n note: cheat = win, but used analysis more than 10 times\n"); + cprint (fd, " users playing %d games or fewer not included\n", cutoff); + cprint (fd, + "\n\nuser\t won cheat lost drawn win %% win %% win %%\n"); + cprint (fd, "\t black white total\n\n"); + for (up=usertab;uptotal > cutoff) + { + int swon, scheat, slost, sdrawn; + ++nuser; + twon =+ (swon = up->won[0]+up->won[1]+up->won[2]); + tcheat =+ (scheat = up->cheat[0]+up->cheat[1]+up->cheat[2]); + tlost =+ (slost = up->lost[0]+up->lost[1]+up->lost[2]); + tdrawn =+ (sdrawn = up->drawn[0]+up->drawn[1]+up->drawn[2]); + spercent =+ up->totalpercent; + c6tos (up->name, buf); + cprint (fd, "%s\t%5d%8d%8d%8d", buf, swon, + scheat, slost, sdrawn); + prpercent (fd, up->percent[1]); + prpercent (fd, up->percent[2]); + prpercent (fd, up->totalpercent); + cputc ('\n', fd); + } + } + cprint (fd, "\ntotals\t%5d%8d%8d%8d", twon, tcheat, tlost, tdrawn); + tpercent = twon*1000/(twon+tlost); + cprint (fd, "%22d.%d\n", tpercent/10, tpercent%10); + spercent = spercent/nuser; + cprint (fd, "average\t%51d.%d\n", spercent/10, tpercent%10); + } + +prpercent (fd, n) + {cprint (fd, "%6d.%d", n/10, n%10); + } + +enterstat (p) stat *p; + + {user *up; + + up = ulookup (p->name); + if (up && p->hcap == 0) + {if (p->user > p->machine) + if (!p->aflag) ++up->won[p->color]; + else ++up->cheat[p->color]; + else if (p->user < p->machine) ++up->lost[p->color]; + else ++up->drawn[p->color]; + ++up->total; + } + } + +ulookup (n) + + {user *up; + + for (up=usertab;upname == n) return (up); + if (cuser < euser) + {int i; + cuser->name = n; + cuser->total = 0; + for (i=0;i<=2;++i) + {cuser->won[i] = 0; + cuser->lost[i] = 0; + cuser->cheat[i] = 0; + cuser->drawn[i] = 0; + } + return (cuser++); + } + return (0); + } + +rdstat (fd, p) stat *p; + + {char buf[BUFSIZ], *s; + + if (scan (fd, buf, BUFSIZ, '\t')) return (1); + p->name = csto6 (buf); + if (scan (fd, buf, BUFSIZ, '-')) return (1); + p->user = atoi (buf); + if (scan (fd, buf, BUFSIZ, '\t')) return (1); + p->machine = atoi (buf); + if (scan (fd, buf, BUFSIZ, '\t')) return (1); + + s = buf; + p->color = 0; + if (*s == '*') {p->color = 1; ++s;} + else if (*s == '@') {p->color = 2; ++s;} + p->aflag = FALSE; + if (*s == 'a') {p->aflag = TRUE; ++s;} + else if (*s == 'r') {p->user = 0; p->machine = 100; ++s;} + p->hcap = atoi (s); + + if (scan (fd, buf, BUFSIZ, '\n')) return (1); + return (0); + } + +rdfacc (fd) + + {cuser = usertab; + while (rduser (fd)); + return (0); + } + +int rduser (fd) + + {char buf[BUFSIZ]; + int name, sz, *p; + user *up; + + if (getfield (fd, buf, BUFSIZ)) return (0); + if (buf[0] == 0) return (0); + name = csto6 (buf); + up = ulookup (name); + if (up->total) + {c6tos (name, buf); + cprint ("Duplicate stats entry for %s\n", buf); + } + sz = sizeof(*up)/sizeof(0); + p = up; + ++p; --sz; sz =- 3; /* ignore percent fields */ + while (--sz >= 0) + {if (getfield (fd, buf, BUFSIZ)) return (0); + *p++ = atoi (buf); + } + if (getline (fd, buf, BUFSIZ)) return (0); + return (1); + } diff --git a/src/as/o/oxgp.c b/src/as/o/oxgp.c new file mode 100644 index 00000000..961d2237 --- /dev/null +++ b/src/as/o/oxgp.c @@ -0,0 +1,508 @@ +# include "c/c.defs" +# define FORFEIT 'F' + +char *filename; +char *itoa(); + +int formno; /* 0=old form (backwards init position), + 1=new form */ + +main (argc, argv) +int argc; +char *argv[]; + + {int fout, fin, n; + static char opnstr[13] + {'o', 'g', 'a', 'm', 'e', '.', '1' }; + fout = copen("o.xgp",'w'); /* open output file */ + prxgpheader (fout); + --argc; + ++argv; + n = 0; + if (argc == 0) + {filename = opnstr; + fin = copen ("ogame.<", 'r'); + if (fin > 0) + {filespec fs; + filnam (itschan (fin), &fs); + c6tos (fs.fn2, opnstr+6); + n = atoi (opnstr+6); + cclose (fin); + while (TRUE) + {fin = copen (opnstr, 'r'); + if (fin > 0) dofile (fin, fout, opnstr); + else break; + ++n; + itoa (n, opnstr+6); + } + } + } + else + {while (--argc >= 0) + {filename = *argv; + fin = copen (*argv, 'r'); + if (fin > 0) dofile (fin, fout, *argv); + ++argv; + } + } + cclose(fout); + } + +prxgpheader (fout) + {cprint(fout,";SKIP 1\n;VSP 0\n;LFTMAR 96\n;TOPMAR 0\n;BOTMAR 0\n"); + cprint(fout,";KSET DSK:FONTS1;O20,DSK:FONTS1;METM,DSK:FONTS;20FG\n"); + } + +dofile(fin,fout,fname) + char *fname; + + {while (dogame (fin, fout, fname)); + cclose(fin); + } + +dogame (fin, fout, fname) + char *fname; + + {char board [8] [8] [8]; + char movstr [8][4], gmstr[200], title[100]; + int m, blen, scores [8][2], bnum; + blen = parse(fin, gmstr, title); + if (blen < 0) return (0); + cprint(fout, "\p\n\400`%s (%s)\n\n\412", title, fname); + initboard (board, scores); + bnum=0; + for (m=0;m= 0) + cprint(fout, xgpst1[i] , ++bnum, movstr [i], + scores [i] [0], scores [i] [1]); + else + {if (movstr[i] [0] == -1) + cprint(fout, xgpst2[i], ++bnum); + else break; + } + if (movstr[++i] [0] >= 0) + cprint(fout, xgpst1[i] , movstr [i], + scores [i] [0], scores [i] [1]); + else + {if (movstr[i] [0] == -1) + cprint(fout, xgpst2[i]); + else break; + } + } + cprint(fout, "\n\"\412\400"); + } + + /* print the eight board positions */ + +pr8pos (fout, movstr, board) + char board[8] [8] [8]; + char movstr [8][4]; + + {register int i, j, k; + + for(j=0; j<8; ++j) + {for (i=0;i<8;++i) + {if (movstr[i] [0] == -2) break; + for (k=0; k<8; ++k) + cputc(board [i] [j] [k], fout); + cputc(' ', fout); + if (movstr [++i] [0] == -2) break; + for (k=0; k<8; ++k) + cputc(board [i] [j] [k], fout); + cprint(fout, " "); + } + cprint(fout, "\n"); + } + } + + /* print the bottom line */ + +prbottom (fout, movstr) + char movstr[8][4]; + + {register int j; + char static *xgpst3[7] + {"", " ", " \\", " ", + " X", " \p", " \tT", " "}; + + for(j=0; j<8; ++j) + {if (movstr[j][0] == -2) break; + cprint(fout, "%s!j\"", xgpst3[j]); + } + } + +int makmv(board, color, hpos, vpos, movstr) +char board [8] [8]; +char movstr[4]; +int color, hpos, vpos; + + {int i,j,ocolor; + int nchng; + + movstr[0] = hpos; + movstr[1] = '-'; + movstr[2] = vpos; + movstr[3] = '\0'; + hpos = hpos - '0'; + vpos = vpos - '0'; + + if (board[--hpos][--vpos] !='_') return(0); + + nchng = 0; + ocolor = 'B'; + if (color=='B') ocolor = 'W'; + + if ((hpos>1) && (board [hpos-1] [vpos] == ocolor)) + { + {for (i=hpos-2; + (i>=0)&&(board[i] [vpos]==ocolor); + --i) ; + } + if ((i>=0)&&(board[i][vpos]==color)) + {nchng = nchng+(hpos-(++i)); + do board [i] [vpos] = color; + while (++i < hpos); + } + } + + if ((hpos>1) && (vpos>1) && (board [hpos-1] [vpos-1] == ocolor)) + { + {for (i=hpos-2, j=vpos-2; + (i>=0)&&(j>=0)&&(board[i] [j]==ocolor); + --i, --j) ; + } + if ((i>=0)&&(j>=0)&&(board[i][j]==color)) + {nchng = nchng+(hpos-(++i)); + do board[i][++j]=color; + while (++i < hpos); + } + } + + if ((vpos>1) && (board [hpos] [vpos-1] == ocolor)) + { + {for (j=vpos-2; + (j>=0)&&(board[hpos] [j]==ocolor); + --j) ; + } + if ((j>=0)&&(board[hpos][j]==color)) + {nchng = nchng+(vpos-(++j)); + do board [hpos] [j] = color; + while (++j < vpos); + } + } + + if ((hpos<6) && (vpos>1) && (board [hpos+1] [vpos-1] == ocolor)) + { + {for (i=hpos+2, j=vpos-2; + (i<=7)&&(j>=0)&&(board[i] [j]==ocolor); + ++i, --j) ; + } + if ((i<=7)&&(j>=0)&&(board[i][j]==color)) + {nchng = nchng+((--i)-hpos); + do board [i][++j] = color; + while (--i > hpos); + } + } + + if ((hpos<6) && (board [hpos+1] [vpos] == ocolor)) + { + {for (i=hpos+2; + (i<=7)&&(board[i] [vpos]==ocolor); + ++i) ; + } + if ((i<=7)&&(board[i][vpos]==color)) + {nchng = nchng+((--i)-hpos); + do board [i] [vpos] = color; + while (--i > hpos); + } + } + + if ((hpos<6) && (vpos<6) && (board [hpos+1] [vpos+1] == ocolor)) + { + {for (i=hpos+2, j=vpos+2; + (i<=7)&&(j<=7)&&(board[i] [j]==ocolor); + ++i, ++j) ; + } + if ((i<=7)&&(j<=7)&&(board[i][j]==color)) + {nchng = nchng+((--i)-hpos); + do board[i][--j] = color; + while (--i > hpos); + } + } + + if ((vpos<6) && (board [hpos] [vpos+1] == ocolor)) + { + {for (j=vpos+2; + (j<=7)&&(board[hpos] [j]==ocolor); + ++j) ; + } + if ((j<=7)&&(board[hpos][j]==color)) + {nchng = nchng+((--j)-vpos); + do board [hpos] [j] = color; + while(--j > vpos); + } + } + + if ((hpos>1) && (vpos<6) && (board [hpos-1] [vpos+1] == ocolor)) + { + {for (i=hpos-2, j=vpos+2; + (i>=0)&&(j<=7)&&(board[i] [j]==ocolor); + --i, ++j) ; + } + if ((i>=0)&&(j<=7)&&(board[i][j]==color)) + {nchng = nchng+(hpos-(++i)); + do board [i] [--j] = color; + while(++i < hpos); + } + } + + if (nchng) board [hpos] [vpos] = color; + return(nchng); + } + +int parse (fin, gmstr, title) +int fin; +char gmstr[], title[]; + + {int n, i, c; + if (ceof (fin)) return (-1); + formno = 0; + c = cgetc (fin); + if (c && c != '1') + {while (c && c == ' ') c = cgetc (fin); + while (c && c != '\n' && c != '\p') + {*title++ = c; + if (c == '(') formno = 1; + c = cgetc (fin); + } + if (c != '\n') return (-1); + while (c != '1' && c) c = cgetc (fin); + } + *title = 0; + + if (ceof (fin)) return (-1); + n = 0; + do + {i = rdline (fin, gmstr, n); + n =+ i; + } + while (i == 4); + while (gmstr[n-2] == FORFEIT) n =- 2; + return (n); + } + +int rdline (fin, gmstr, n) +char gmstr[]; + + {int chr; + + gmstr[n] = gmstr[n+2] = FORFEIT; + if (ceof (fin)) return (0); + if (n>0) /* initial 1 already read */ + {cgetc(fin); + if (n>=((10-1)*4)) cgetc(fin); + } + if (cgetc(fin) != '.') + {pskip (fin); + return (0); + } + cgetc (fin); + if ((chr=cgetc(fin)) == 'F') skip (fin, 6); + else if (chr=='R') + {pskip (fin); + return (0); + } + else + {gmstr[n] = chr; + cgetc(fin); + gmstr[n+1] = cgetc(fin); + } + chr = cgetc (fin); + if (chr == ' ') + {chr = cgetc (fin); + if (chr == '(') + {do chr=cgetc (fin); + while (chr && chr != '\n' && chr != '\p' + && chr != ')'); + if (chr==')') chr=cgetc (fin); + } + } + if (chr != '.') + {pskip (fin); + return (2); + } + skip (fin, 2); + if ((chr=cgetc(fin)) == 'F') skip (fin, 6); + else if (chr=='R') + {pskip (fin); + return (2); + } + else + {gmstr[n+2] = chr; + cgetc(fin); + gmstr[n+3] = cgetc(fin); + } + while ((chr=cgetc(fin)) != '\n' && chr != '\p' && chr); + return (4); + } + +skip (f, n) + {while (--n>=0) cgetc (f); + } + +pskip (f) + {int c; + while (((c = cgetc (f)) != '\p') && c); + } + +atoi (s) +char *s; + + {int n, c; + n = 0; + while (c = *s++) n = (n * 10) + (c - '0'); + return (n); + } + +char *itoa (n, s) +char *s; + + {int a; + if (n<0) n=0; + if (a = (n / 10)) s = itoa (a, s); + *s++ = '0' + n%10; + *s = 0; + return (s); + } + \ No newline at end of file diff --git a/src/as/o/random.1 b/src/as/o/random.1 new file mode 100644 index 00000000..9a610876 --- /dev/null +++ b/src/as/o/random.1 @@ -0,0 +1,30 @@ +; +; RANDOM NUMBER GENERATOR (STOLEN FROM MUDDLE) +; +RELOCATABLE +TITLE RANDOM +.INSRT C;NC INSERT +.INSRT C;NM INSERT + +CENTRY SRAND,[SEED] + MOVE A,SEED + ROT A,-1 + MOVEM A,RLOW + RETURN + +CENTRY RAND + + MOVE A,RHI + MOVE B,RLOW + MOVEM A,RLOW ;Update Low seed + LSHC A,-1 ;Shift both right one bit + XORB B,RHI ;Generate output and update High seed + MOVE A,B + RETURN + +.IDATA +RHI: 267762113337 +RLOW: 155256071112 +.PDATA + +END diff --git a/src/as/o/random.rel b/src/as/o/random.rel new file mode 100644 index 0000000000000000000000000000000000000000..39c0983b66a5a2efbd409af9eebeb3c277009087 GIT binary patch literal 531 zcmXw0OD_Xa7(I7pbed?i5oD+^43&6PEj00H(~7uKA}A3%@mvTRiAQL(iG_dQ2iWo- z5F0x`0V_)*+C@cjefLg%i*wJMbMDQ#cU+%d)IUx?FJJ)>6(Iym*+dbNph-BE&@Mqv za|HN)F!V|D_P6P!Vh}39vqP3I>>9?PzMUWX`nZne_%ii7ckV zoY&LKdhb3#tDc?U|zlM8rhu!hS*6}VZQ`Y@02v|Ot#Kae@9xsdR zVtQ^;aYa_M(|cp?|4m)ZFH8N;=gGkp(mCMk?)JQ(R6es(bL2R}F literal 0 HcmV?d00001 diff --git a/src/as/o/stdio.c b/src/as/o/stdio.c new file mode 100644 index 00000000..564feae0 --- /dev/null +++ b/src/as/o/stdio.c @@ -0,0 +1,69 @@ +# include "c/c.defs" +int stdin, stdout; +extern int cin, cout; + +stdio () + + {stdin = cin; stdout = cout; + on (ctrlg_interrupt, INT_IGNORE); + } + +flopen (name, mode) char *name, *mode; + + {int f; + f = copen (name, mode[0]); + if (f == OPENLOSS) return (0); + return (f); + } + +printf (a, b, c, d, e, f, g) + {cprint (cout, a, b, c, d, e, f, g);} + +fprintf (a, b, c, d, e, f, g) + {cprint (a, b, c, d, e, f, g);} + +strcmp (s1, s2) {return (stcmp (s2, s2));} + +fclose (f) {cclose (f);} + +fread (f, buf, size, number) char buf[]; + + {int n; + n = size * number; + while (--n >= 0) *buf++ = cgetc (f); + } + +freopen (name, mode, f) char *name, *mode; + + {int i; + cclose (f); + i = copen (name, *mode); + return (i); + } + +getuid () {return (rsuset (074));} + +getpw (w, buf) char *buf; + {c6tos (w, buf);} + +nowtime (tv) int tv[]; + {cal foo; + now (&foo); + tv[0] = tv[1] = cal2f (&foo); + } + +char *ctime (tv) int tv[]; + {static char buf[100]; + cal foo; + int f; + f2cal (tv[0], &foo); + f = copen (buf, 'w', "s"); + prcal (&foo, f); + cputc ('\n', f); + cclose (f); + return (buf); + } + +unlink (s) {delete (s);} +exit (cc) {cexit (cc);} + \ No newline at end of file diff --git a/src/as/o/stdio.rel b/src/as/o/stdio.rel new file mode 100644 index 0000000000000000000000000000000000000000..801e4c6331e3c1cd765060208f20c88b1fdf9698 GIT binary patch literal 2234 zcmaJ?UrbwN6hF5uw`~}=Z7A%PKzjoVQ7q{G0@>_ZE-ltVi%?)&H!Yi+4;z#Hp?|W1 zcfx{i#D|%gq0z_LGOyqcz{YZK zc3uSzI7FHERWKu33N^j~zyt5ScRfKOpEqAqZzEAXvq#XAfY^Z?NyTUK zTtSXJ4104iUl*a#!F}oLqaZc_Ori!DVN701**jIf1~|51M78Vr?7b-vO~7eeyV?$+ z!-PHrk*B2np=lsi5~QNf8{`;P(vQHCL7rbbZFT_bU(?eOKm`eNr=KtNRF>>iw)6+A zU@9%lDpg<&;`RajmDUvCO6daT8uo+PNOI{3Z7e+0c8Y*6$%Kh6Euf5J!aCxF~1bp*8jhtg9kS;)IFzI zcZbntd#*I3r&Q8uW}#AIb)x$b(y-Lpvg!?$e+Oi}D3ye96c49Dt>Q9z zn9MlIG(S^Rs4&ilnwFqsm7XG^tXqyW^WZOHb8u9)?b7!rwQVFf&2)jB7db2_7Cs@)7Oqc_NR z6$N906WC+F%873OMSY}7~JP3u3`r84(Z02Co5eu|LH#p zf|Y|+W5Ov4tJFL{tv5A>4(wcvr69HHV)MUct>~HqszE_dAJVj&(`d})(d0ny&KZcL{onNGhei^9>g%&NJ-6j9WXL9rw*yvipg4_-BunB0@&byp419w zYF|wsVw`E8vGfOUB&j&(be}{K36?2RI_-?CHuvTBk18L7`_B8WXZ6(L%eouMi(0d&+f-Hj?X$-#G5j#wRz=_~kPcOUpzM zRn`|DJ!TAs*B2jLWGYia)(c%^=G^>zuK%`*x4K>!@(F9%x91@=39vdE=95fR`&zYx z09#WQ+eg!s8mlZGrq4J&?#4IMN9aQH$l_7IE|bM>i6OGMphI^`&Jx1Qam)AEavvldKo;e0&*}UaYrH=Jh5