Author: martin fierz
Date: 14:22:41 04/27/02
Go up one level in this thread
On April 27, 2002 at 14:52:11, Alvaro Jose Povoa Cardoso wrote: >Hi Martin, >once again I'm asking your help if you don't mind. > >I was thinking that for my first aproach to checkers EGTB doing only 4 of 5 men >and doing it without the subdivision by the 'leading man rank'. >All this is just to get the feel of it. Later I'll add the 'leading man rank' >subdivision. > >So I would like to ask you if you could rewrite the following code without the >bmrank and wmrank variables (taken from the positiontoindex()function): > > > if(bm) > bmrange = bicoef[4*(bmrank+1)][bm] - bicoef[4*bmrank][bm]; > if(wm) > wmrange = bicoef[4*(wmrank+1)][wm] - bicoef[4*wmrank][wm]; > if(bk) > bkrange = bicoef[32-bm-wm][bk]; > > if(bmrank) > bmindex -= bicoef[4*bmrank][bm]; > if(wmrank) > wmindex -= bicoef[4*wmrank][wm]; > > posindex = bmindex + wmindex*bmrange + bkindex*bmrange*wmrange + >wkindex*bmrange*wmrange*bkrange; > > >Thanks in advance, >Alvaro Cardoso hi alvaro, i still think it would be a good idea to just change my move generator to the spanish rules, but i understand that you want to do it yourself :-) if you don't want to use the bmrank/wmrank concept, then things are of course simpler. if(bm) bmrange = bicoef[28][bm]; if(wm) wmrange = bicoef[28][wm]; if(bk) bkrange = bicoef[32-bm-wm][bk]; posindex = bmindex + wmindex*bmrange + bkindex*bmrange*wmrange + wkindex*bmrange*wmrange*bkrange; aloha martin
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.