home *** CD-ROM | disk | FTP | other *** search
/ Kids Cube / 5_Logic.iso / flip47 / flip.doc next >
Text File  |  1993-04-28  |  21KB  |  387 lines

  1.      Flip-it and Octothello.
  2.     -------------------------
  3.   Copyright PC Solutions 1991, All rights reserved.
  4.  
  5.   This is documentation for the PC-SOLUTIONS games of FLIP-IT and
  6. OCTOTHELLO. It may only be distributed together with the shareware
  7. versions of those programs in a complete, unaltered form - other uses
  8. require explicit permission from PC SOLUTIONS first.
  9.   [NOTE:- FLIP-IT and OCTOTHELLO are now integrated as 1 program - the
  10. Octothello game is selected by selecting corner-shape 3 on the title
  11. screen - some shareware versions of FLIP-IT automatically start in this
  12. mode. For normal OTHELLO, select corner-shape zero.]
  13.  
  14.   Octothello/FLIP-IT are variants on the board game REVERSI (or
  15. OTHELLO). There have been many versions of OTHELLO published in magazines
  16. and shareware libraries, and yet they all play VERY weak games -
  17. OCTOTHELLO is probably the first REALLY decent OTHELLO game to be
  18. released as shareware. OCTOTHELLO is much, much more than OTHELLO - you
  19. can set it for normal OTHELLO if you like, and it will play a VERY good
  20. game - or you can select hundreds of different board and corner shapes
  21. and sizes, with each variation having its own subtleties!
  22.   As I have said, there have been many OTHELLO programs written, since
  23. the rules lend themselves to computer implementation. Most programs just
  24. seem to play by trying to flip over the maximum number of pieces at each
  25. move - but this is a recipe for disaster if used against someone with
  26. knowledge of the game. Have a go at playing OCTOTHELLO like that, then
  27. when you have lost by about 60 disks to 4, come back and read how to
  28. REALLY play! I believe these weak programs have lead to OTHELLO being
  29. looked down upon a bit by some of the more hardened computer users, and
  30. yet OTHELLO can sometimes surpass CHESS in subtlety and depth!
  31.   Let us start with Normal OTHELLO. The game starts with the following
  32. board:-
  33.                                      DIAGRAM 1
  34.          A  B  C  D  E  F  G  H
  35.       1  -  -  -  -  -  -  -  -
  36.       2  -  -  -  -  -  -  -  -
  37.       3  -  -  -  +  -  -  -  -      O  -  White
  38.       4  -  -  +  O  x  -  -  -      x  -  Black
  39.       5  -  -  -  x  O  +  -  -      Black to play. 
  40.       6  -  -  -  -  +  -  -  -      (+ indicates legal black moves)
  41.       7  -  -  -  -  -  -  -  -
  42.       8  -  -  -  -  -  -  -  -
  43.  
  44.   The rules that define a legal move are very simple when seen in real
  45. play, but they sound complex when written down, so it is a good idea to
  46. run FLIP-IT/OCTOTHELLO and try an auto-demo to get the idea. Anyway, you
  47. may move to a vacant square if it is adjacent to an opponents piece, and
  48. if by moving to that square you bracket a horizontal/vertical/diagonal
  49. line of your opponents piece(s) between the square you are moving onto
  50. and a square you already occupy. All of the opponents pieces bracketed or
  51. trapped in this way are captured and are flipped over to your colour. As
  52. I said it is much easier to see this by example - in Diagram 1 above
  53. black can move to the squares marked '+' - for instance if he moves to C4
  54. he 'traps' whites piece at D4 between his at C4 and E4, and D4 becomes a
  55. black piece.
  56.   If a player has no legal moves available he must PASS a turn, allowing
  57. his opponent to take another turn. However if he has a legal move
  58. available he MUST take it - you may only pass when you have no moves.
  59.   The game ends when all 64 squares are full up, or when neither player
  60. has legal moves available - even though there may be some vacant squares
  61. left. Once the game ends, the player with the most pieces wins - or
  62. occasionally there is a draw if both players have the same.
  63.   So, because the object of the is to finish with more disks than your
  64. opponent, some people translate this as meaning "Gosh, lets flip over as
  65. many disks as possible with every move." leading to disaster. You could
  66. imagine that the following diagram could result at the end of a game
  67. where White has been capturing everything in sight..
  68.  
  69.          DIAGRAM 2             O = White, x = Black, Black to play
  70.  
  71.          A  B  C  D  E  F  G  H
  72.       1  -  O  O  O  O  O  O  -
  73.       2  O  O  O  O  O  O  O  O
  74.       3  O  O  O  O  O  O  O  O
  75.       4  O  O  O  O  O  O  O  O
  76.       5  O  O  O  x  O  O  O  O
  77.       6  O  O  O  O  O  O  O  O
  78.       7  O  O  O  O  O  O  O  O
  79.       8  -  O  O  O  O  O  O  -
  80.  
  81.  
  82.   Black has only one disk on the board at D5, with the four corner
  83. squares empty and white holding the remaining 59 squares. And yet, if you
  84. play out the game, you will find that black wins by 40 disks to 24! IE.
  85. Black plays A8, White PASSES, then A1, PASS, H1, PASS, H8. While this is
  86. an extreme example, this sort of chaotic turn-about often occurs in the
  87. last few moves of an othello game, particularly when a master player
  88. crushes a novice. The critical factor in the above example are the CORNER
  89. SQUARES. Whites mass of pieces were totally unstable because he didn't
  90. have possession of the corners. These are referred to as STABLE SQUARES -
  91.  once you have a corner it can never be recaptured by your foe, and also
  92. other adjacent pieces of your colour can also become stable, forming an
  93. unassailable fortress from which you can attack the rest of the board.
  94.  So if, for instance, in Diagram 2 White had already occupied, say, A1,
  95. the whole mass of 28 pieces up and left of the A8-H1 diagonal become
  96. stable white territory, and white would win the game.
  97.   By implication, it is bad to occupy the squares adjacent to the corner
  98. squares before you have captured the corner, because you may be offering
  99. your opponent the option to get the corner, either immediately or later.
  100. Consider the following position:-
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.          DIAGRAM 3             O = White, x = Black, White to play
  114.  
  115.          A  B  C  D  E  F  G  H
  116.       1  -  -  -  -  -  -  -  -
  117.       2  -  x  -  -  -  -  -  -
  118.       3  -  -  x  O  O  -  -  -      
  119.       4  -  -  -  x  O  -  -  -     
  120.       5  -  -  -  O  x  -  -  -     
  121.       6  -  -  O  -  -  x  -  - 
  122.       7  -  -  -  -  -  -  -  -
  123.       8  -  -  -  -  -  -  -  -
  124.  
  125.   Black has, rather foolishly, just moved to the B2 square. While White
  126. cannot capture the corner immediately, all he needs to do is to move to
  127. F5 (capturing E5), and wherever black moves he cannot recapture E5, so
  128. White will be able to capture A1 on the next turn. The square at B2, and
  129. also those at B7, G2 and G7 are referred to in Othello terminology as the
  130. X-SQUARES, and are generally considered very bad to occupy, especially in
  131. the early/mid game. While there are some particular positions towards the
  132. end-game where an "X-SQUARE SACRIFICE" can actually win you the game, you
  133. should avoid these squares unless you know what you are doing.
  134.   The Edge squares adjacent to the corners, (B1, A2, G1, H2, A7, B8, H7
  135. and G8) are called the C-SQUARES, for rather obscure historic reasons.
  136. The position with C-SQUARES is more complex - while they may offer your
  137. opponent future access to a corner, there are some positions where it is
  138. relatively safe to take these squares, particularly towards the end of a
  139. game. However it is still wise to avoid occupying a C-SQUARE unless you
  140. are sure it is a safe position. Of course once you actually occupy a
  141. corner all this changes, and it becomes desirable to capture the adjacent
  142. C and X-SQUARES - these will now be stable and unassailable.
  143.   OK, now up to this point I have discussed ideas that may already be
  144. known, at least to some extent, to people who have picked up OTHELLO from
  145. some of the other shareware OTHELLO offerings. I now move to ideas that
  146. are less commonly known outside the realm of serious OTHELLO players, and
  147. yet are critical to actually winning games against strong opponents.
  148.   So far, you understand that your ultimate objective is to get stable
  149. corner (and then surrounding) squares - but what strategy should you
  150. adopt in the early-mid game, before you get near these squares? Well, if
  151. you think about it, you want to FORCE your opponent to capture weak
  152. squares such as (say) an X-SQUARE, enabling you to capture a corner -
  153. after all he probably will not make such moves voluntarily. However if
  154. you can engineer a situation where your opponent only has one or two
  155. legal moves available, and these moves are to weak squares, he will have
  156. no choice! Here we come to an absolutely critical concept in OTHELLO -
  157. MOBILITY. The MOBILITY of a player is simply a count of the number of
  158. legal moves he has available - a subset of this, what you could call
  159. GOOD-MOBILITY, is a count of legal moves excluding bad C and X-SQUARE
  160. moves that result in the opponent getting the corner. Consider the
  161. following:-
  162.  
  163.  
  164.  
  165.  
  166.  
  167.          DIAGRAM 4             O = White, x = Black, Black to play
  168.  
  169.          A  B  C  D  E  F  G  H
  170.       1  -  -  O  -  -  -  -  -
  171.       2  -  -  O  O  O  O  -  -
  172.       3  O  O  x  x  x  O  -  -
  173.       4  O  O  x  O  O  O  -  -     
  174.       5  O  O  O  O  x  O  -  -     
  175.       6  -  -  O  O  x  O  -  - 
  176.       7  -  -  O  x  O  O  -  -
  177.       8  -  -  O  O  -  O  -  -
  178.  
  179.   Here all black needs to do is move to E8, effectively blocking whites
  180. last decent move. Now white has only one move left, and he HAS to move to
  181. B2, allowing black to get A1. By capturing a corner this early in the
  182. game, black should have no problem in forcing a win. Take a note of the
  183. formation after blacks E8 move - all of blacks pieces are surrounded by
  184. white ones (except C3), and white occupies all the peripheral or frontier
  185. pieces. This is called CENTRAL CONTROL, and it is very desirable to have
  186. this sort of formation - the more peripheral squares you have, the more
  187. moves you are offering your opponent!
  188.   While in the above example disaster was just one move away for white,
  189. the strategy for whittling away at your opponents stock of good moves
  190. holds out for the longer term as well. If you watch a game between a weak
  191. player and an expert, and made a note of the mobility after each move,
  192. you will often see the expert players mobility creep up, while that of
  193. the weak player diminishes to a point where he literally has no decent
  194. moves at all.
  195.   So what long term strategy increases your mobility? Here we come to one
  196. of the most shocking truths about OTHELLO - because while the ultimate
  197. goal is to get more disks than your opponent, the best way to win is to
  198. actually keep your disk count LOW in the early and mid game! This is
  199. called EVAPORATION strategy, and can be translated at its simplest as
  200. trying to flip over the FEWEST number of opponents disks at each move.
  201. The logic behind this is simple - the more disks you have on the board,
  202. the more mobility you are ultimately offering your opponent. However we
  203. can refine this strategy further, since it is clearly worst to flip over
  204. peripheral (rather than central) pieces, because the more peripheral
  205. pieces you have, the more moves you are offering your opponent. A move
  206. that doesn't flip over many (or any) peripheral squares is called a QUIET
  207. move, and this will be illustrated in our next example. Incidentally note
  208. that evaporation doesn't apply once you start capturing corners, because
  209. your tactics will then be to MAXIMISE your STABLE (ie. unflippable) piece
  210. count.
  211.   Another feature of the Diagram 4 is whites wall of pieces from F2 to F8
  212. - it is considered very bad to form an unbroken peripheral wall like this
  213. since white has no options to move into the territory in the G and H
  214. columns. Similarly once the wall has been formed, black should avoid
  215. breaking up the wall by cutting across it - this would let white off the
  216. hook. Consider blacks options in Diagram 5:-
  217.  
  218.  
  219.  
  220.  
  221.          DIAGRAM 5             O = White, x = Black, Black to play
  222.  
  223.          A  B  C  D  E  F  G  H
  224.       1  -  -  O  O  O  O  -  -
  225.       2  -  -  O  O  -  -  -  -
  226.       3  -  -  O  O  O  O  -  -
  227.       4  -  -  x  x  O  O  -  -     
  228.       5  -  -  x  x  O  O  -  -     
  229.       6  -  -  O  O  x  x  -  - 
  230.       7  -  -  O  O  -  -  -  -
  231.       8  -  -  -  -  -  -  -  -
  232.  
  233.   Compare two of blacks moves, E2 and F2. From the point of view of
  234. evaporation they are the same - they flip over the same number of disks.
  235. However note that E2 only flips over central pieces, and only creates one
  236. new white move at F2. By comparison, F2 flips over a whole mass of
  237. peripheral squares E3,F3,F4,F5, creating no less than 6 new white move
  238. options - and sealing off a similar number of his own move options to
  239. boot! What's worse, he has created a wall of pieces from F2 to F6, and is
  240. in a pretty bad way.
  241.   It is important to try and see the effects of tactics like mobility and
  242. evaporation at depth. Consider the following:-
  243.  
  244.          DIAGRAM 6             O = White, x = Black, Black to play
  245.  
  246.          A  B  C  D  E  F  G  H
  247.       1  -  -  -  -  -  -  -  -
  248.       2  -  -  -  -  -  -  -  -
  249.       3  -  O  O  -  x  -  -  -
  250.       4  x  O  x  O  O  O  O  -     
  251.       5  O  x  x  x  x  x  -  -     
  252.       6  O  O  O  O  O  O  -  - 
  253.       7  -  -  x  O  O  -  -  -
  254.       8  -  -  x  -  -  -  -  -
  255.   
  256.   Black can force a corner capture thus:- A7, E2, A3, G6, A2, and white
  257. now only has B7, conceding A8 to black. You will need an OTHELLO board to
  258. play this through - or the full version of FLIP-IT, which allows the
  259. setting up and playing through of positions.
  260.   Let us consider another category of OTHELLO squares - the EDGE squares.
  261. Even though these squares are peripheral, occupying them does not
  262. directly create moves for your opponent, since he cannot move 'beyond'
  263. the edge and flip them! So, on the face of it, occupying a wall of pieces
  264. along the edge of the board does not seem bad, and to a certain extent
  265. this is true. However you should be wary of occupying edge territory too
  266. early in the game - it can tend to make subsequent moves 'flip' over more
  267. non-edge pieces than you want to, in other words it works against your
  268. evaporation and mobility in the long run.
  269.   As mentioned earlier, the edge squares adjacent to the corner (the C-
  270. SQUARES) can be dangerous to occupy, since they sometimes offer your
  271. opponent an option to form a tactical trap, allowing him to get a corner.
  272. Consider this position:-
  273.  
  274.  
  275.          DIAGRAM 7             O = White, x = Black, White to play
  276.  
  277.          A  B  C  D  E  F  G  H
  278.       1  -  x  -  -  -  -  -  -
  279.       2  -  -  x  x  O  -  -  -
  280.       3  -  -  O  O  O  -  -  -      
  281.       4  -  -  O  O  x  O  -  -
  282.       5  -  -  x  O  x  -  -  -     
  283.       6  -  -  -  O  -  -  -  - 
  284.       7  -  -  -  -  -  -  -  -
  285.       8  -  -  -  -  -  -  -  -
  286.  
  287.   Black has just taken an isolated C-SQUARE, B1. If white now takes E1,
  288. then whatever black does (he cannot move C1 or D1) white can go C1! Now
  289. black must lose the corner - if he goes D1, white can still simply take
  290. A1. Isolated C-SQUARES like that are the worse - the situation is not so
  291. bad when you already occupy some of the edge squares. Even then there are
  292. dangers:-
  293.  
  294.          DIAGRAM 8             O = White, x = Black, White to play
  295.  
  296.          A  B  C  D  E  F  G  H
  297.       1  -  -  O  O  O  O  O  -
  298.       2  -  -  O  x  O  O  -  -
  299.       3  -  x  x  x  O  O  -  -
  300.       4  x  O  O  O  O  O  -  -
  301.       5  x  x  x  x  x  O  -  -
  302.       6  x  O  O  x  x  O  -  -
  303.       7  -  -  -  -  -  -  -  -
  304.       8  -  -  -  -  -  -  -  -
  305.  
  306.   Here black can play B2! Now if white replies with A1, black can take a
  307. toe hold at B1, and no matter where white goes, black can take H1 and not
  308. only get a corner, but also a whole edge of stable squares from B1 to H1.
  309. Note that blacks B2 move was to a normally dangerous X-SQUARE, and this
  310. is one of the occasions when an X-SQUARE and corner sacrifice is a
  311. winning tactic. Whites pieces from C1 to G1 are called an UNBALANCED
  312. EDGE, and are dangerous because white only occupies one of the C-SQUARES
  313. - if he already had B1, he would not be in danger. While unbalanced edges
  314. are not always bad, they should still be avoided if at all possible.
  315.   There quite a lot of different tactical edge traps, along similar lines
  316. to the above positions. I don't have space to cover all this here - see
  317. below if you want to get more OTHELLO material.
  318.   As the very end of the game approaches, the value of the corner squares
  319. diminish and the actual piece count becomes more relevant - particularly
  320. stable disk counts. In the last few moves of the game you simply want to
  321. flip over the maximum number of disks RELATIVE TO YOUR OPPONENT - trying
  322. to see this is called DISK-COUNTING, and is something that humans are bad
  323. at, and computers are good at! FLIP-IT can sometimes execute PERFECT play
  324. over the last twenty or more moves of the game, based simply on counting
  325. pieces for all possibilities! 
  326.   General rules of thumb for the end-game are hard to come by, and again
  327. this is better served by a more comprehensive OTHELLO book. There will be
  328. more extensive notes and documents with the full version of FLIP-IT - if
  329. you got this document with the shareware version, you'll need to get the
  330. full version to progress. I can also recommend an excellent book,
  331. "OTHELLO, BRIEF AND BASIC" - this is available from:-
  332.   The British Othello Federation, 62 Romsey rd, Winchester SO22 5PH.
  333.     They also do a newsletter - for 5 pounds/year - send an SAE for details.
  334.   Other Othello newsletters and clubs:-
  335.     FFO, BP 147, 75062 Paris, Cedex 02, France.
  336.     Othello Quarterly, 920 Northgate av,Waynesboro,VA 22980,USA
  337.  
  338.      FLIP-IT and OCTOTHELLO specific notes and bits..
  339.     --------------------------------------------------
  340.   You may have seen an early version (FLIP14.EXE) on some computer-
  341. magazine cover disks - ignore the level of play of that program - the
  342. latest version is immeasurably stronger. I was able to apply much of what
  343. I learnt from writing SAGE-DRAUGHTS (Probably the strongest commercially
  344. available CHECKERS program) to writing FLIP-IT. In particular, a fast,
  345. deep, lightweight search algorithm seems to work better than trying to
  346. load the program with too many human-play derived parameters - if the
  347. program is intelligent enough to search the right lines it can figure out
  348. most of the traps and combinations for itself based on a few simple
  349. evaluations like corner squares, stable squares, evaporation and
  350. mobility.
  351.   One feature I have preserved from SAGE DRAUGHTS is the IQ system for
  352. calculating depth-of-search, rather than the more traditional 'ply'
  353. method. This is based on various factors, such as mobility (thus deep-
  354. scanning critical combinations with low-mobility), and it averages out to
  355. about 9 points per ply - however it will search some combinations much
  356. deeper. The search iteratively deepens in steps of 20 points, however
  357. this amount is fine-tuned according to the amount of time in hand.
  358.   Another innovation I have introduced into FLIP-IT is the ability to try
  359. different board sizes and corner shapes. Since the stable corner squares
  360. are so critical to OTHELLO, the game play is radically altered if you
  361. block-out some squares around the corner as non-usable. You can try this
  362. yourself on a normal OTHELLO board - try blocking out squares A1,A2,B1,
  363. and the same in the other 3 corners, and you get OCTOTHELLO, with 8
  364. 'corner' squares! FLIP-IT has a total of 16 corner shapes selectable from
  365. the front menu, including normal OTHELLO of course. Another fun-thing you
  366. can do is try different board-sizes, anything from 4 by 4 up to 19 by 19.
  367. For instance FLIP-IT can 'solve' the game on a 4 by 4 board, as resulting
  368. in a forced win for black! By implication OTHELLO is probably a forced
  369. win for white or black - its just a question of getting a computer to
  370. search deep enough! Don't laugh - a Super-Computer program is getting
  371. close to doing this for the game of DRAUGHTS (or CHECKERS), by stint of
  372. storing billions of end-game positions! Hmm.. anyone out there got a
  373. Cray-5 going spare?
  374.   I have released a shareware version of FLIP-IT, however the full
  375. version is a commercial product, and you will want to get this if you are
  376. a serious player. The full version (On GAMES-PACK-2) has full game
  377. replay/save/load/print features, game comment text, board edit/setup,
  378. response time (and hence play strength) variable from 1 second up to 1
  379. week, and very pretty CGA/EGA/VGA graphics. It also comes with other
  380. interesting strategy games, and full documents. It costs just 9.15 pounds
  381. inc mail (PC compatible, 5.25 or 3.5 disk), or USA customers can pay
  382. normal cheques IN US DOLLARS for only $24 - that's including AIR MAIL and
  383. currency conversion charges.
  384.        Cheques, P.O.'s and Enquiries to:-
  385.    PC SOLUTIONS, Dept OTH, PO BOX 954, Bournemouth BH7 6YJ, ENGLAND.
  386.  
  387.