★ AMSTRAD CPC ★ GAMESLIST ★ OTHELLO (COMPUTING WITH THE AMSTRAD) (c) COMPUTING WITH THE AMSTRAD ★

Computing with the Amstrad
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

ROBIN NIXON hauls a 19th century game into the computer age

OTHELLO couldn't be simpler - it's a game with only one rule. Easy to learn but very hard to play well, for the state of the board can change drastically after only one move.

This is, in fact, how Othello got its name. It was invented in England some time during the 19th century and was then forgotten until it was rediscovered in 1971 by Goro Hasegawa from Japan.

His father, who was a Shakespeare scholar, remarked on how there was a similarity between the sudden reversals of situation in Shakespeare's play and the game.

As with chess and draughts, Othello is played on an 8 x 8 board with the exception that all the squares are the same colour. The counters are double sided, usually black on one side and white on the other, with each player having a different colour.

At the start of each game the players place four counters at the centre of the board (see Figure I).

Thereafter they take it in turns to place a counter with their own colour face up on an empty square in such a way that there is at least one counter of the opposite colour sandwiched between it and another of the player s own colour, in either a horizontal, vertical or diagonal direction.

All the opponent's sandwiched counters are then turned over to become the player's colour. It is possible for a player to sandwich the opponent's counters in several directions with one move (see Figure lla). In such a case all sandwiched counters are turned (Figure llb). A player must always turn over at least one of the opponent's counters. If this is not possible the move is forfeited.

The game continues until the board has been filled, one or the other player has no counters left on the board, or neither player can move. The winner is the one with the most counters of their own colour.

As the object of Othello is to end up with the greatest number of counters of your own colour, it can be very tempting to try and turn over as many of your opponent's pieces as possible right from the start. However this can be very dangerous, because during the opening and middle game the more counters you have and the less your opponent has, the more options are left open to your opponent (see Figure III).

After a few games you soon realise that the state of the board can change completely during the last eight or so moves. It therefore becomes apparent that certain squares have a higher strategic value, while others can be very dangerous.

The strongest positions are the corners, because once gained a counter on a corner cannot be turned over and neither can counters of the same colour placed either side (see Figure IV) So corners can become a solid base from which to launch an offensive.

The sides are also very strong, as counters placed there can only be turned over in one direction and can be used to turn over counters of the opposite colour in three directions (Figures Va and Vb).

In implementing Othello on a computer it would be possible to construct an algorithm that searched several moves ahead. However the time taken to compute each move could be several hours.

Of course this would become a lot less if the program were written in Assembler.

One way to overcome this problem is to construct a table of weightings showing which positions are stronger than others (see Figure VI). This table can be updated as play continues and positions that were weak become strong and vice versa.

Another strategy worth adopting is to prevent the computer from turning over too many counters at the beginning of the game, leaving a large number of possible moves available, while during the endgame choosing moves that turn over the largest number of counters.

These two strategies together enable the computer to play a reasonably advanced game taking only 1 5 seconds a move on the easy level and less than two minutes a move on the hard level.

If you are an experienced Othello player you might like to try experimenting with altering the table of weightings (lines 210-290) or the amount by which the weightings are adjusted when a corner move is being made (lines 1660-1690).

You could also write a subroutine to adjust the weighting when a side move is made or alter the down level subroutine to look two or more moves ahead instead of one.

This version of Othello requires only two keys, as the computer works out all your possible moves before asking for an input.

The Spacebar is used to scan between possible moves and Enter selects or enters a move. This saves having to type in coordinates, helps you not to miss a move and avoids the need to check for an illegal move.

CWTA

OTHELLO (COMPUTING WITH THE AMSTRAD)
(c) COMPUTING WITH THE AMSTRAD

AUTHOR: Robin Nixon

★ YEAR: 1986
★ LANGUAGE:
★ GENRE: BASIC , BOARD , OTHELLO
★ LiCENCE: LISTING
★ COLLECTION: COMPUTING WITH THE AMSTRAD 1986

 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listings:
» Othello-Robin  Nixon    (Computing  with  the  Amstrad)    ENGLISHDATE: 2020-07-23
DL: 147
TYPE: ZIP
SiZE: 7Ko
NOTE: 40 Cyls
.HFE: Χ

» Othello-Robin  Nixon    ENGLISH    LISTINGDATE: 2013-09-22
DL: 217
TYPE: PDF
SiZE: 846Ko
NOTE: 9 pages/PDFlib v1.6

Je participe au site:
» Vous avez des infos personnel ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 444 millisecondes et consultée 1385 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.