# incubator-cassandra-user mailing list archives

##### Site index · List index
Message view
Top
From aaron morton <aa...@thelastpickle.com>
Subject Re: Modeling troubles
Date Thu, 21 Jul 2011 22:16:07 GMT
```I've no idea about the game or how long you will have to live to compute all the combinations

- row key is byte array describing the position of white/black pieces and the move indicator.
You would need to have both rows keyed from blacks perspective and rows keyed from whites
perspective.
- each column name is the byte array for the possible positions of the other colour

Good luck.

-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 22 Jul 2011, at 01:18, Stephen Pope wrote:

> For a side project I’m working on I want to store the entire set of possible Reversi
boards. There are an estimated 10^28 possible boards. Each board (from the best way I could
think of to implement it) is made up of 2, 64-bit numbers (black pieces, white pieces…pieces
in neither of those are empty spaces) and a bit to indicate who’s turn it is. I’ve thought
of a few possible ways to do it:
>
> -          Entire board as row key, in an array of bytes. I’m not sure how well Cassandra
can handle 10^28 rows. I could also break this up into separate cfs for each depth of move
(initially there are 4 pieces on the board in total. I could make a cf for 5 piece, 6, etc
to 64). I’m not sure if there’s any advantage to doing that.
> -          64-bit number for the black pieces as row key, with 65-bit column names (white
pieces + turn). I’ve read somewhere that there’s a rough limit of 2-billion columns, so
this will be problematic for certain. This can also be broken into separate cfs, but I’m
still going to hit the column limit
>
> Is there a better way to achieve what I’m trying to do, or will either of these approaches
surprise me and work properly?

```
Mime
View raw message