Welcome, Guest. Please Login or Register.
Apr 23rd, 2024, 3:46am

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « DAPE - Depreciated Arimaa Piece Evaluator »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   DAPE - Depreciated Arimaa Piece Evaluator
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: DAPE - Depreciated Arimaa Piece Evaluator  (Read 6176 times)
99of9
Forum Guru
*****




Gnobby's creator (player #314)

  toby_hudson  


Gender: male
Posts: 1413
DAPE - Depreciated Arimaa Piece Evaluator
« on: Nov 9th, 2006, 9:24pm »
Quote Quote Modify Modify

Announcing the latest material evaluation function.
 
Basically each piece is valued according to:
* how many enemy pieces are stronger than it ("above"), and  
* how many enemy pieces are equal in strength ("equal").
 
The score for each piece is simply:
score = A/(S+E*equal+above);
 
Where A, S, and E are all constants.  E must be in the interval (0,1), A and S should both be positive.
 
Suggested starting values are given below.
 
A fairly ad-hoc correction for what happens when you run short of rabbits is then added, but this could be further refined.
 
Toby
 
Code:

double DAPE(position *p) {
  int typ, c, e;
   
  double Amplitude   = 18.0;
  double Shift  = 0.25;
  double Equal_mult  = 0.3;
 
  /* count the number of colour c pieces that are above or equal this value */
  int above[2];
  int equal[2];
  double score[2];
 
  above[0] = 0;
  above[1] = 0;
   
  equal[0] = 0;
  equal[1] = 0;
   
  score[0] = 0.0;
  score[1] = 0.0;
 
  for (typ=6; typ>=1; typ--) {
 for (c=0; c<2; c++) {
   above[c] += equal[c];
   equal[c] = bc2(p->bd[c][typ]);
 }  
 
 for (c=0; c<2; c++) {
   e = c ^ 1;
   score[c] += equal[c]*Amplitude/(Shift+Equal_mult*equal[e]+above[e]);
 }
  }
 
  /* now special penalties if the number of rabbits gets too low */
  score[0] -= 40.0*pow(0.6,equal[0]);
  score[1] -= 40.0*pow(0.6,equal[1]);
   
  /*  DRAW ANALYSIS SHOULD BE INCLUDED IN FINAL PROGRAM */  
 
  return (score[1]-score[0]);
 
}
« Last Edit: Nov 9th, 2006, 9:26pm by 99of9 » IP Logged
Fritzlein
Forum Guru
*****



Arimaa player #706

   
Email

Gender: male
Posts: 5928
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #1 on: Nov 9th, 2006, 10:35pm »
Quote Quote Modify Modify

So what are some consequences?  Does DAPE like M or HD?  D or RR?  Where does it work better than FAME?  (Not that FAME is hard to beat, but I'm curious about the specifics...)
IP Logged

99of9
Forum Guru
*****




Gnobby's creator (player #314)

  toby_hudson  


Gender: male
Posts: 1413
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #2 on: Nov 9th, 2006, 11:03pm »
Quote Quote Modify Modify

Here's one of Janzert's funky calculators for it:
http://members.westnet.com.au/doctorhudson/arimaa/dape.html
(I hope there's no bugs, I wrote it quickly, and I don't actually know javascript)
 
I can't remember why I thought it was better!  I invented it a couple of months ago, and tried some specific predictions, but you'll have to make that judgement for yourself.
IP Logged
99of9
Forum Guru
*****




Gnobby's creator (player #314)

  toby_hudson  


Gender: male
Posts: 1413
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #3 on: Nov 9th, 2006, 11:28pm »
Quote Quote Modify Modify

Well, I've already found one bug.
 
If you've already killed an M and given away your HD (which the current constants of DAPE thinks is favourable), DAPE then recommends:
 
1) Trade elephants (correct)
2) Trade horses (??)
3) Do not trade dogs (??)
4) Trade rabbits (wrong)
 
The problem is, I can't easily fix #4 just by changing constants...
« Last Edit: Nov 9th, 2006, 11:29pm by 99of9 » IP Logged
Fritzlein
Forum Guru
*****



Arimaa player #706

   
Email

Gender: male
Posts: 5928
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #4 on: Nov 10th, 2006, 8:40am »
Quote Quote Modify Modify

on Nov 9th, 2006, 11:28pm, 99of9 wrote:
If you've already killed an M and given away your HD (which the current constants of DAPE thinks is favourable), DAPE then recommends:
 
1) Trade elephants (correct)
2) Trade horses (??)
3) Do not trade dogs (??)
4) Trade rabbits (wrong)

I haven't played a unbalanced M for HD (or HC) game in a while.  Perhaps shifting strategies have made them less common.  But even so I'm quite confident that when you have M for HD, you do not want to trade horses.
 
I just checked out the cool DAPE calculator, and DAPE agrees with me.  In fact, it thinks trading horses there is even more catastrophic for the side with camel than I think it is.  I think you must have made a mistake in reporting that one.
 
I agree with you that the camel side doesn't want to trade rabbits (and thus disagree with DAPE), but I don't feel strongly about that.  Rabbit trades are still pretty much equal in that situation.  FAME has a teeny tiny bias against trading rabbits, and I think that's both the right direction and the right magnitude.
 
It's interesting that DAPE clearly prefers a dog to two initial rabbits and a horse to three initial rabbits.  Thus it values pieces more relative to rabbits than FAME, at least in the early going.
IP Logged

99of9
Forum Guru
*****




Gnobby's creator (player #314)

  toby_hudson  


Gender: male
Posts: 1413
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #5 on: Nov 10th, 2006, 4:28pm »
Quote Quote Modify Modify

on Nov 10th, 2006, 8:40am, Fritzlein wrote:

I just checked out the cool DAPE calculator, and DAPE agrees with me.  In fact, it thinks trading horses there is even more catastrophic for the side with camel than I think it is.  I think you must have made a mistake in reporting that one.

Oh, good, you're right.  Sorry about that.
 
Quote:
It's interesting that DAPE clearly prefers a dog to two initial rabbits and a horse to three initial rabbits.  Thus it values pieces more relative to rabbits than FAME, at least in the early going.

In my judgement DAPE is correct on both of these, but I don't feel so strongly to call that an error by FAME.  DAPE knows that these trades get less valuable when material goes off the board, and soon discourages them.
« Last Edit: Nov 10th, 2006, 4:29pm by 99of9 » IP Logged
Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #6 on: Nov 13th, 2006, 3:08pm »
Quote Quote Modify Modify

The FAME calculator now does both FAME and DAPE and needs a name change, probably AMES calculator. Hopefully it will grow IdahoEV's naive evaluator soon as well.
 
The one discrepancy that stood out to me while working on it was H for CC, FAME slightly prefers losing the horse while DAPE would rather lose the cats.
 
Janzert
IP Logged
Fritzlein
Forum Guru
*****



Arimaa player #706

   
Email

Gender: male
Posts: 5928
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #7 on: Nov 13th, 2006, 8:40pm »
Quote Quote Modify Modify

Thanks, Janzet.  I'm going to have fun with that.  Since everyone found a bunch of flaws in FAME after it came out, I especially want to give DAPE a rude reception.  Let me point out that in ERR vs dccrr, Gold is clearly losing, but DAPE says Gold is clearly winning.
 
It's funny that FAME thinks a free cat is worth 1.49 and a free horse is worth 3.12 (more than 2 * 1.49) but nevertheless slightly prefers two free cats to a horse.  I might slightly prefer the horse myself, but IdahoEv's research currently seems to be favoring small pieces, so I may be further wrong than FAME.
IP Logged

99of9
Forum Guru
*****




Gnobby's creator (player #314)

  toby_hudson  


Gender: male
Posts: 1413
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #8 on: Nov 13th, 2006, 11:00pm »
Quote Quote Modify Modify

Nice job janzert.
 
In response to Fritz's position, and the general trading down failures, I've updated the formula on my version of the calculator:
 
http://members.westnet.com.au/doctorhudson/arimaa/dape.html
 
It now includes a term similar to the low-rabbit penalty, which is basically a low-piece penalty.  I've also adjusted the coefficients a bit to accommodate the change.
 
Would you mind including this alteration for me Janzert?  Sorry, it's a bit of an iterative process.
IP Logged
Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #9 on: Nov 14th, 2006, 2:59am »
Quote Quote Modify Modify

No problem, I rather expect it to change for a bit yet. Now updated. Also updated the constant to normalize the initial rabbit capture.
 
Also when I added DAPE in I got rid of the raw score display altogether since comparing them directly doesn't really make any sense.
 
Janzert
IP Logged
99of9
Forum Guru
*****




Gnobby's creator (player #314)

  toby_hudson  


Gender: male
Posts: 1413
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #10 on: Nov 14th, 2006, 4:07am »
Quote Quote Modify Modify

Thanks Janzert.
 
The biggest disagreements I've found so far are:
 
dapefamecorrect
ERREMR ?
EMHDDCC8REMHHDDC6R ?
EHDDCC8R EMHHDDCC dape
EMHHC8R EHHDDCC8R fame?
EMHHCC7R EHHDDCC8R ?
EHHDDCxR EMDDCCxR ?
EHC4R EMD3R ?
     
     

 
I'll add more to the list when people mention them.
« Last Edit: Nov 14th, 2006, 4:41am by 99of9 » IP Logged
mattj256
Forum Guru
*****



Arimaa player #8519

   


Gender: male
Posts: 138
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #11 on: May 3rd, 2013, 3:41am »
Quote Quote Modify Modify

I was looking online at the piece evaluator.  Did you know that for R vs EMHHDDCC most of the material evaluators say that Silver is winning even though Silver has no rabbits left?  Is there a deeper issue here or is it strictly a theoretical concern?  It's not like the situation I described is going to happen in a real game...
IP Logged
supersamu
Forum Moderator
Forum Guru
*****



Arimaa player #7523

   


Gender: male
Posts: 140
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #12 on: May 4th, 2013, 3:38am »
Quote Quote Modify Modify

You can´t trust material evaluators when 8 rabbits are of the board.  
There is no "deeper issue" there. What also is weird is this:
 
- when gold has a handicap of 8 rabbits, and silver has only one piece left, a rabbit, FAME thinks gold is ahead by 22.51.
 
- when gold has a handicap of 8 rabbits, and silver has no pieces left, FAME thinks the teams are even.
 
So FAME would recommend for silver to sacrifice his last piece in the situation descibed above.  
But as I said, these are issues that only come up when one team has no rabbits on the board.  
There was a rulechange that made the player with no rabbits left immediately lose the game.  
But this rulechange happened after FAME and DAPE were developed.
Conclusion: Material Evaluators use a formula to evaluate the position and when there are 0 rabbits left, the formula doesn´t work in the intended way.
IP Logged

mattj256
Forum Guru
*****



Arimaa player #8519

   


Gender: male
Posts: 138
Re: DAPE - Depreciated Arimaa Piece Evaluator
« Reply #13 on: May 4th, 2013, 4:04am »
Quote Quote Modify Modify

Cool thanks.
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.