No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
This is a nice problem, one which can give you many hours of enjoyment, depending of course on how you define enjoyment. I've been throught this exercise a number of time in different languages, so let me give you my thoughts on where the complexity lies. First, as you say, it is not enough to simply derive the algebraic form of the from and to squares. If it was then something as simple as this would suffice for each1
But that is far from enough. You need to know the following as well:
Well, you get the idea. And some of these can combine to make wonderful moves like e7xf8=Q++ Best of luck with it, and I for one would very much like to see your code when you finish! Update: I recommend that to start with you deal with the simple form a1a2 and worry about the more complex notation later. There is so much more to consider (much more interesting too) that this should be passed over quickly. For instance, think about move generation first, perhaps some bit twiddling for efficiency, or bitmaps to help you with simultaneous generation of (in particular) pawn moves. Minimax, or more specifically AlphaBeta pruning thereof still keeps me amused for hours whenever I revisit. Ahh...and I must finish the version in C#, one day, perhaps when the Delphi version rises above 1500...
1 converted from C# without testing
In reply to Re: Parsing Chess Algebra Notation
by EdwardG
|
|