Author: Daniel Clausen
Date: 03:27:11 07/01/02
Go up one level in this thread
On June 30, 2002 at 22:27:55, Russell Reagan wrote: >I'm curious if there are any schools of thought when it comes to computer chess. >Earlier today at work while I was trying to avoid working I was thinking about >two different approaches to developing an engine. One approach (which as far as >I know seems to be the most popular) is to pick your data structures based on >personal preferences, recommendations by more experienced developers, or >whatever the reason may be. > >I was reading over some CCC archives on my break and I read about how Vincent >was doing something in his program (attacks I think), and I saw how he was able >to do attacks very fast, but my other thought was that he surely put some >thought into how he wanted to evaluate positions before he decided upon what >kind of data structures to use. > >I believe the example was that he had an array that incrementally kept track of >how many pieces attacked a particular square, so when it came time to evaluate, >he had everything ready to go and I imagine he probably does other things like >this, and so his evaluation is probably very efficient. > >So approach number two would be to decide how you'd like to evaluate positions >and then decide which data structures best accomplish that. For example, if >mobility is a factor that you think is very important, then you should choose >data structures that make it possible to calculate that efficiently and not do >extra move generation and recursive calls to calculate mobility. I've often >struggled with how to approach deciding on which data structures to use, and >this seems to at least be a better method (maybe) of choosing data structures. >This (to me) seems like a better way than saying, "I'm going to use 0x88 because >it can do fast edge detection and attack detection." If fast edge detection and >attack detection aren't significant factors in your programs evaluator, then >this might not be a wise method of choosing your data structures. > >A final thought I had regarding this was that the ultimate wise decision would >be to choose the method that best suits your strengths as the programmer. For >example, let's say that ideally bitboards were the fastest (just for the sake of >discussion). Now, if your strength lies in programming ability, then that is >probably the right decision for you, since you will get the most out of that. >What if your strength is not programming though? What if you are a good >programmer, but your true talent lies in the ability to find abstract ways of >evaluating positions (IE ways that would work in a chess program)? If that is >your talent, then maybe you should choose the second approach (choosing your >data structures based on evaluation factors). > >I'm not entirely sure if any of this would work better in practice than current >methods, but I think it sounds good in theory anyway. I like the idea of >"playing to your strengths" though. > >Russell [snipped very good thoughts] While I agree that's it would be clever to think about eval and all these things before choosing a data structure, I think that most novice chess programmers simply don't know yet what they will do later. Of course Bob has a clear idea and therefore he would only spend a fraction of a second to choose bitboards again. So does Vincent and would choose 0x88. But when I started with my first engine, I had no clue at all. For example I didn't know that later I probably would want to generate capture and non-captures moves separately. etc etc etc. I started 3 times completely from scratch (1st time a primitive basic thing, 2nd time with 12x12 board representation, 3rd with bitboard, maybe 4th time with 0x88 :) And I guess many programmers also started more than once. I agree that a lot of the internal stuff can be hidden, when you design an engine well. But if you change something so fundamental as the data-structure from bitboard to 0x88 (or something else) it's probably time to start with a new engine. Sargon
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.