Shartranj!

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

tmokonen
Posts: 1362
Joined: Sun Mar 12, 2006 6:46 pm
Location: Kelowna
Full name: Tony Mokonen

Re: Shartranj! material values-- any thoughts

Post by tmokonen »

adams161 wrote:You know i had to look to see what pulsar's material values are for shatranj. I think i just plugged in some values based on the knight and rook being 'valuable' and that was the end if it.

this is what pulsar is using:

pawn 100
knight 350
bishop 250
rook 600
queen 200

bishop and queen have different names and mobility in shatranj but you get the idea probably.

any thoughts?

Mike
Hi Mike. I have the book New Rules For Classic Games in my rather meagre library. In the section on Shatranj, it has the following recommendation (bishops = elephants, queens = generals):

"In as-Suli's book, the following piece values are given, and are no doubt based on decades, if not centuries, of experience: Rook 5, Knight 3 1/3, General 1 2/3, elephant 1 1/4, center pawn 1 1/4, knight's or elephant's pawn between 5/6 and 1, and rook's pawn 5/8. But the kingside elephant was regarded as more valuable than the general-side elephant, because it could support and be supported by the general."

as-Suli was a Shatranj master from the 900's (!), and considered one of the greatest players of the game.

I guess it makes more sense that the queen is valued higher than the bishop, because it can visit all 32 squares of its own color, while the bishop can only visit 8 squares in total.
adams161
Posts: 626
Joined: Sun May 13, 2007 9:55 pm
Location: Bay Area, CA USA
Full name: Mike Adams

Re: Shartranj! material values-- were rook is 1 dirhem

Post by adams161 »

I think i stumbled across that on wikipedia. http://en.wikipedia.org/wiki/Shatranj#Piece_values

I am using the values that wikipedia says are by as-Suli who gives piece values in dirhem, the currency in use in his time:[3]

3 ^ a b c d e Murray, H.J.R. (1913). A History of Chess. Benjamin Press (originally published by Oxford University Press). ISBN 0-936-317-01-9.


Rook 1 dirhem
Knight 2/3 dirhem
Fers 1/3 - 3/8 dirhem
Alfil 1/4 dirhem
Central pawn (d-, or e-pawn) 1/4 dirhem
Knight's or Alfils's pawn (b-, c-, f-, or g-pawn) 1/6 - 1/5 dirhem
Rook's pawn (a- or h-pawn) 1/8 dirhem

Pulsar in this current match is fairly closely following those values with some additional scoreing for rook mobility, knight placement and a small incentive to advance pawns.

It will be interesting to see how it does even with the bare king bug announced earlier.

Mike
User avatar
hgm
Posts: 28391
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shartranj! material values-- any thoughts

Post by hgm »

adams161 wrote:I shoudl have that barring bug fixed today. I wanst able to get any games that went to endgame to test yesterday.

How is the match going otherwise? your link for the match was not working.

Mike
OK, it seems that my chess PC suddenly has another IP address on my internal network, and the port mapping in the router for the HTML server was still to the old IP number. Apparently simply starting up the server does not remap the port.

Try it now, I remapped the port manually. (Problem is that I cannot test the link; I have to use the IP address on my internal network, and the outside address does not work. So I had noticed the re-mapping of the IP address. I was just not aware thet the router would not addapt the mapping to the new assignment of IP addresses it had made.)

On the page there is a link to the PGN file with all games in the Shatranj tourney so far. Just look for the games of Pulsar2007-9e-34. My impression was that many games get in an almost equal ending. But those are exactly the endings that Pulsar loses due to an illegal move.So the score is still pretty disastrous (13-3 for Fairy-Max now).
adams161
Posts: 626
Joined: Sun May 13, 2007 9:55 pm
Location: Bay Area, CA USA
Full name: Mike Adams

Re: Shartranj! material values-- any thoughts

Post by adams161 »

the link to watch the games posted earlier is working. One thing obvious from that last game is there needs to be some endgame code to encourage the queen piece ( moves one space diagonally in the 4 directions) to move to the center of the board. and the king needs to be forced to the side. Pulsar looked to have a winning postion but it had no incentive to move any particular piece but the knight which has some position bonsues. i suspect my king endgame array to force the king to the side never turned on since i'm not sure i eavluate shatranj piece values in determining endgame.

Mike
User avatar
hgm
Posts: 28391
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shartranj! material values-- any thoughts

Post by hgm »

As to the piece values: it seems I did underestimate the Pawns and Elephants a lot. Based on R=500, my Knight was 325 vs the recommended 333, but it gets centralization points (a sort of primitive piece square), and the Rook doesn't. So that s pretty clos. (And of course known very well from normal Chess.)

The Ferz I measured, and it came out at 150. Again, very close to the recommended 166, as also the Ferz gets centralization points. I actually found that a pair of Ferzes was just a bit weaker then a Knight. But I would have figured a single Ferz is worth less than half a pair, as it is a color-bound piece (just like Bishops). But perhaps the promise of getting a complimentary Ferz through promotion is dependable enough that you can include the bonus even for the single Ferz.

I am a bit skeptical wrt the value of the Pawn. 125 seems way too large, even in normal Chess. And here the Pawns promote to nearly useless pieces, surely that must suppress their value. Computer programs work usually better with light Pawns anyway. Micro-Max uses 80 for pawns in normal Chess, with N=280 and R=480. But perhaps I should scale up Pawns from 50 to 70, and Elephants from 70 to 100.

I should play some material imbalace games, Ferz vs two Elephants. It would be very useful to know who has the upper hand there. But before I start doing such measurements, I want to make sure that the engine with which I do it doesn;t play like a complete idiot. The baring rule is more important than I thought. Perhaps I should make a special version of Fairy-Max that does countthe number of pieces each side has, so that it can apply the baring rule in the tree search, and do the piece-value measurements with that.
adams161
Posts: 626
Joined: Sun May 13, 2007 9:55 pm
Location: Bay Area, CA USA
Full name: Mike Adams

Re: Shartranj! material values-- any thoughts

Post by adams161 »

what is interesting about the pawns is they are only worth 1/4 of a rook if they are on e or d file. the pawns on the b c and f and g files are worth 1/5 to 1/6 i think it was. so the center pawns are worth 125 and the outer pawns are closer to 100. the rooks pawns are worth only 1/8 i think it was or about 62 points. thats with a rook worth 500 ( for convience i took the base unit, the rook and valued it at 600 and then correspondingly changed values on down. ) that of course is the view from the arab master quoted earlier.

i watched a game were pulsar got 2 queens up or something or a queen and elephant. i think with the proper end game code to force it to at least move those promoted queens once they queen ( move to center and force king to side ) the extra material could have created mating threats possibly. the problem was in the endgame pulsasr had no incentive to cordinate its pieces and force the king to the side. I think it dropped a queen , i didnt go over the game but it was up enough points that i think there was a repetion threat and it felt it was better to give it up than to draw on repetion. but with proper cordination instead of wasteful shuffling such things would happen less often ( though repetion is always a threat).

the queen may noot be completely worthless. A two queen advantage if the queens and other pieces attack the king in endgame could force mathing threats and the trading of pieces.

Mike
adams161
Posts: 626
Joined: Sun May 13, 2007 9:55 pm
Location: Bay Area, CA USA
Full name: Mike Adams

Re: Shartranj! material values-- any thoughts

Post by adams161 »

with regard to making a special version of fairy max, one thing i do with pulsar, to prevent haveing to have several pulsar programs, is i keep all the code in one engine, but what i do do, is take a function, say evaluate or search, copy it from my main code, so now i have search and shatsearch(). this gives me the freedom to tear things up and make changes, without having to have one engine with tons of if statements such as if wild=0 then else if wild=28 then.

currently pulsar has 3 search functions depending on variant and 4 evaluates. I may branch that out furhter.

an advantage is the same program can log on to icc or be loaded by the user or downloaded by the user and play multiple variants.

A disadvantage is when you add major new search features the work has to be done in multiple functions.

Mike
adams161
Posts: 626
Joined: Sun May 13, 2007 9:55 pm
Location: Bay Area, CA USA
Full name: Mike Adams

Re: Shartranj! material values-- any thoughts

Post by adams161 »

Even with the bare king bug, pulsar with its new evaluate has allready beaten the record of pulsar2007-9e-18. it now has 5 points despite forfeiting for illegal moves in some games that would have been drawn. 4 more games to go i think. It also scored its first win.

I think it can win more games. Its clear that it needs some endgame and regular game mobility values for more than just the rook and knight. Some of the games i watched pulsar barely moved its fer ( queen ) or elphant ( bishop). Its rook is perhaps to rewarded for moblity causing it to play it early and risk getting it lost.

this is definite improvement. I shall work on these two issues, moblity values, and the bug with the bare king, and in a few days produce another version.

Mike
User avatar
hgm
Posts: 28391
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shartranj! material values-- any thoughts

Post by hgm »

Agreed. The new version is far stronger. Even with only the baring bug fixed, the current Fairy-Max would already have a hard time beating it. Especially since Fairy-Max is not aware of the baring rule, and would start to throw away dead draws by not avoiding Rook trade in end-games like KRBKR whre it is behind, and Pulsar would immediately jump to the opportunity.

But of course Fairy-Max' play might also improve some by re-evaluating its Pawns and Elephants.
adams161
Posts: 626
Joined: Sun May 13, 2007 9:55 pm
Location: Bay Area, CA USA
Full name: Mike Adams

Re: differences between programmers and pondering

Post by adams161 »

I don't expect fairy max to remain static. that is one difference between the proffesional and non proffesional programers. more information is exchanged, the act of engaging each others efforts becomes to a degree, to use a word that is in dispute, collabortive.

I have one question. I noticed fairy moved instantly at times. Is it pondering? could there be any issue were fairy is using cpu that pulsar is trying to use as pulsar does not ponder? What are the ethics here? My tendency is to believe pondering should only be allowed if both engines ponder or if the match gives a dedicated machine to each engine.

Mike