Re: othello data structures etc.



<bob@xxxxxxxxxxxxxx> wrote:
>I was just wondering if you guys know what data structures and
>functions are best for an Othello game. Right now, I'm just using an
>array of 64 chars.
>
>Also, my functions for enumerating moves and what not probably are
>quite suboptimal. If anyone has any insights regarding this sort of
>thing, I'd love to hear about them.

By far your biggest win will come from algorithmic improvements, so choose
a sensible approach to the game mechanics, but don't make your life too
complicated.

An array of chars is fine (don't copy the board, though). This is often set
up as an array of 10x10, with the extra edges set up as illegal squares (this
simplifies edge checking)

You can get info on othello programs at:
http://satirist.org/learn-game/systems/othello/

There are also some interesting papers on othello in the literature.
I'd recommend reading the dissertation on Keyano for a survey of the
field.

Matt
.



Relevant Pages

  • Re: othello data structures etc.
    ... functions are best for an Othello game. ... I'm just using an array of 64 chars. ... you want to move in A1, it is a waste of time to check if you can flip the inexistant upper discs, or the inexistant left discs, etc. ...
    (comp.ai.games)
  • Re: "free space" with declared type
    ... >> But an array of char is an array of bytes. ... > effective type is also transmitted through memcpy). ... The declared type of 'ca' is array of four chars. ... The declared type of 'ip' is pointer to int. ...
    (comp.lang.c)
  • Re: sort() array names sequentially with numbers
    ... have numerals and I wanted to put them in sequential numerical order. ... returns the array in an order I do not want and is not consistent. ... What numCmp is doing is breaking the file names into arrays of digits and non-digit parts, then compares them - chars as chars and numbers as numbers. ... var x = a.replace; ...
    (comp.lang.javascript)
  • Re: Creating and Accessing Very Big Arrays in C
    ... memory a pointer takes up. ... if I wanted to store a 100x100x100 3D array ... of 'chars', a 1D array would allocate 1,000,000 bytes. ... This allocates 10^6 bytes ...
    (comp.lang.c)
  • Re: communication via gpib-drivers in c#
    ... > is there a way converting this decimal type with the ascii-code in it into ... > string or an array of chars? ...
    (microsoft.public.dotnet.languages.csharp)