From: Jeroen Tiggelman CONSUL NL> Date: 10 dec 1996 Subject: Evaluation (was Re: Computer Shogi) Glen Miner wrote: >One step in the board evaluation process is modify a 'score' based on the >pieces on the board and in hand. I have a table of integer modifiers that >corrispond to individual pieces, like so: >Pawn = 10 >Lance = 50 >Horse = 45 >Now, here is where I would like some advice. Can anyone suggest values >would be good? What about pieces in hand? How much should they be >'worth'? Is having 2 golds in hand worth twice what having one gold in >hand is? Should the computer value its pieces more highly than it values >the pieces of its opponent? That's a lot of questions. First of all: no, having two golds in hand is not worth twice as much as one. In most positions it will be much easier to find a tsume with, say, a silver, a knight and two golds than fout golds, notwithstanding the fact that you would probably count a gold highest as an individual piece, simply because having more kinds of pieces in hand is having more potential attack moves. This also means in general that it is harder to defend when your opponent has lots of different options. This, IMO, is also why it's probably harder to teach a computer shogi than western chess: much more a priori valuable branches per move on average. Unfortunately, this same reasoning, keeping your options open (aji), also seems to imply that counting pieces may very well not work very well in this game. In chess, as I see it, material is far more important, mainly because the pieces are generally stronger, and the board is smaller, which means that there generally aren't several separate fights. In shogi it definitely _is_ so, and most of the time it is not possible to _defend_ a position, the thing to do is to be faster in the mate race at the other side of the board. And there will be side-issues, like your Tokin on 2b, which could take the Lance on 1a, or the Kight on 2a, or don't do either, and what is better depends largely on the situation (do you already have a knight? do you already have a lance? have you a particular use for either? do you already have enough material and should you better hurry to attack than pick up more?). The Lance and Knight in question meanwhile, are your opponent's, but depending on the phase of the game, they may be quite irrelevant to him, while those on the other side (near his King) definitely _are_. So putting value on individual pieces as a concept is probably quite questionable. You probably should remember to get footholds in the opponent's camp as a basis for your attacks; if you don't have _any_ and the game is drawing to a close, picking up pieces probably isn't the main issue right now. Pawns are most important to destroy the shape of your opponent's defense. If you can make a Tokin you can keep not too far from the King (depending on the phase), it is probably worth quite something: they can move fast in practice. But for the rest, it's often enough to make sure you have _some_ pawns; and if you have a lot, you can probably find a use for them. But in my vision shogi is more about shape (pattern recognition) than material. You can have the same amount of pieces, but in one position they work together and form a great castle, while in another they have moved too far ahead, and there are holes in the back of your camp (for example). "Should the computer value its pieces more highly than it values the pieces of his opponent?" It seems this depends mainly on the form of your evalution function. If you are talking about possible types of _moves_ in a position, then the answer is probably "yes" (because you have a time advantage), but for _pieces_ I'm not so confident. I suspect that the values for Gold, Silver, Knight and Lance belong in that order, and not too far apart. After the opening, I'd generally value a Rook higher than a Bishop; but an important question is: can I drop it effectively right now? (which you probably solve by looking ahead, but you will have to watch for the horizon effect here, carefully.) I know this wasn't very concrete, but did it help a bit? Jeroen Tiggelman consul nl