Some studies in machine learning using the game of Checkers · PDF

kaynak: jeo.kompas.com
PDF görünümü Sayfa metni Paylaş Orijinal PDF ↗
/ 20

SAYFA 15 / 20

4.3.3 Some Studies in Machine Learning Using the Game of Checkers 549 Appendix A: Programming details • ,..j pproxilllate siz.e of program Basic chccker-playing routine . I 100 instructions Input. move verification and output 1400 instructions Game starting and..\crminating routines 600 instructions Loaders. table generators, dumping, et cetera H50 instructions Statistical and analytical routincs 700 instructions Rote-learning routines 1500 instructions Generalization-learning routines 650 instructions Tables and constants for basic play 700 words Working space for basic play . 2000 words \Vorking space for generalization learning 500 words Working space for rote learning balance of memory • Approximate compllfation times To find all available moves from given board position. 2.6 milliseconds To make a single move and find resulting board position 1.5 milliseconds To evaluate a board position (4 terms) 2.4 milliseconds To find score for a saved board position (rote learning) 2.3 milliseconds To evaluate position (with 16 terms for generalization learning) 7.5 milliseconds • Board representations The standard checkerboard numbering system (see Appendix B) is used in communicating with the machine. A modi- fied numbering system is used for internal computations, the numbers shown on the squares in Fig. A-I corresponding to the bit positions in an IBM 704 word. Any given board position is represented by four such worc1s; one word (FA) containing 1's in those bit positions corresponding to squares containing pieces of the color whose turn it is to move and which normally move in a forward direction. To be specific. if it is Black's turn to move (i.e., i: Black is "active") FA designates the location of all of Black's pieces, both men and kings. Conversely, if White is active, FA designates the location of White's kings only, since White's men can only move in the direction arbitrarily called backward. The other words designate, respectively: BA, backward active pieces; FP, forward passive pieces; and BP, backward passive pieces. To conserve space when writing on tape, three words are used to record board positions with kings, and only two words are used for board positions without kings. These are saved in a standardized form, as explained in the text. Possible moves are designated by five words; one word to indicate by its sign (with the word itself containing other information) whether the moves are jumps or not. (If a jump is available, only jump moves are saved.) The other four words designate the location of those pieces which can move in the four different diagonal directions: RF, for right forward; LF, for left forward; LB, for left backward; and RB, for right backward, respectively. By reference to Fig. A-I, it will be observed that a right-forward move results in an increase of 4 in the square designation. while a left-forward move results in an increase of 5. Bit positions 9, 18 and 27 do not appear on the board. This notation makes it possible to compute available moves fos all pieces simultaneously. Having previously. computed a word called EMPTY, which contains 1's in locations corresponding to all unoccupied squares, one can compute RF, for the normal move case, in four instructions, as listed below (in IBM 704 symbolic language): CLA EMPTY (puts word EMPTY into the accumulator); ALS 4 (shifts word to left by 4 positions); ANA FA (forms logical AND between EMPTY and FA); STO RF (stores word as newly computed RF). Jump moves are computed by a simple extension of this procedure. Multiple jumps are handled as a sequence of single jumps separated by null-reply moves.