Advertisement

a new idea for data storage - bit boards

Started by June 24, 2000 10:25 PM
3 comments, last by farmersckn 24 years, 5 months ago
i was reading that article about chess programming, and it got me thinking about bit boards. so i tried to figure out how to do an array of true bools. cuz the reg. bool is just an int, i think. i have an idea that it would be really useful, but im not sure. tell me what you think about having access to an array that comes in dimensions of 8''s, i.e. 8, 16, 24, 32, etc, and uses real bools, not ints... it would use an array of bytes, or ints, etc, to hold all the bits, thats why it would have to be in sizes of 8''s. but you could access them like an array, i.e. if (ChessBoard[8][3] == true) { do something... } whatever... do you think it would be cool? or is it just a waste of time? i already know how to do this, i just haven''t tested it out yet, and i''m in the business of other stuff right now, so i haven''t really given it much time. Just tell me what you think and if you''d like to know more... farmersckn Sometimes even chickens need to eat... Don't bang your head against a wall just to enjoy the good feeling when you stop.
Yesterday is the past, tomorrow is the future. Today is a gift, that is why we call it the present.
I would save space at the expense of clock ticks...
Would be a good thing for the seive of... of... ''that guy who figured out how to find prime numbers fast'' if you wanted to find LOTS of primes

Bad for chess, cause there''s a ''named & numbered'' amount of squares

Might be good for saving game states to disk... course you''d need one for each type of piece for each player...
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Advertisement
not really as slow as one might think, really, only as slow as plotting pixels in vga mode 13h, cuz you could use bit shifts to access the different bits.
farmersckn

Sometimes even chickens need to eat... Don't bang your head against a wall just to enjoy the good feeling when you stop.
Yesterday is the past, tomorrow is the future. Today is a gift, that is why we call it the present.
yes exactly, you have to bit shift for each number instead of just using it...

course there will be less data to move around... hum, hard to say what would be faster...
Ask MindScape

Edited by - Magmai Kai Holmlor on June 25, 2000 1:45:41 AM
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Magmai, I think the sieve you''re referring to is the sieve of "Aristophne" (and I''m pretty sure I totally butchered the spelling of that name, because I''ve never actually seen it written down.

My programming teacher suggested we use that last year in a program that was designed to test a prime number equation, and it was VERY fast.

This topic is closed to new replies.

Advertisement