ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Chess on the Pico Edition XGamestation
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
nczempin
Guest





PostPost subject: Re: Chess on the Pico Edition XGamestation    Posted: Thu May 03, 2007 7:00 pm Reply to topic Reply with quote

I've received my kit, and have started to put it together. I didn't have an RS-232 cable handy, so I had to wait until tonight to start actually doing some stuff with it.
Because I don't have a TV in the hotel room I'm staying in, I can't test the video/audio output until the weekend.
I will play around blinking a few LEDs, and perhaps connect the 7-segment display that comes with the "extended" Pico (2.0).

In the meantime, I thought a bit about techniques to save memory ruthlessly. I don't care much if I lose speed by some of these techniques; I can always get back a bit of speed if it turns out I'm not even using all those 136 bytes of RAM.

So, here are some ideas:

1. If I disallow sub-promotion and only allow a maximum of 5 queens, I can pack a move into 1 byte instead of two:
1 queen, 28 moves max: 28
2 rooks, 14 moves max: 28
2 bishops, 14 moves max: 28
2 knights, 8 moves max: 16
1 king, 10 moves max: 10
8 pawns, 4 moves max: 32

So I have 142 possible codes using just one queen, and 28 more per additional queen, for five queens I'd need 254 states. Just enough for 1 byte.

Sub-promotion would be much costlier, and occurs virtually never in real games. So I figure it's an adequate tradeoff.

2. For the state of the board I need 4 bits per square * 64 squares = 32 bytes. Using an "indexed" scheme similar to the move packing above I could get it down to 28 (although I don't remember how I did this right now). Plus 3 bits for en passant (one of eight) and 4 bits for castling rights, so make it a byte; we'll find a use for that extra bit Smile

If there are any flaws in my calculations, please let me know...
Back to top
Display posts from previous:   
Subject Author Date/Time
Chess on the Pico Edition XGamestation nczempin Tue Apr 24, 2007 6:54 pm
      Re: Chess on the Pico Edition XGamestation H.G.Muller Wed Apr 25, 2007 10:34 am
            Re: Chess on the Pico Edition XGamestation nczempin Wed Apr 25, 2007 11:30 am
                  Re: Chess on the Pico Edition XGamestation H.G.Muller Wed Apr 25, 2007 12:08 pm
                        Re: Chess on the Pico Edition XGamestation nczempin Wed Apr 25, 2007 12:47 pm
                              Re: Chess on the Pico Edition XGamestation H.G.Muller Wed Apr 25, 2007 1:35 pm
                                    Re: Chess on the Pico Edition XGamestation nczempin Wed May 02, 2007 5:35 pm
                                          Re: Chess on the Pico Edition XGamestation nczempin Thu May 03, 2007 7:00 pm
                                                Re: Chess on the Pico Edition XGamestation H.G.Muller Fri May 04, 2007 7:25 am
                                                      Re: Chess on the Pico Edition XGamestation nczempin Fri May 04, 2007 9:44 pm
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads