Problem with Bihasa

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
George Tsavdaris
Posts: 1627
Joined: Thu Mar 09, 2006 12:35 pm

Re: Problem with Bihasa

Post by George Tsavdaris »

Thanks for all the info. :D
Ferdy wrote:
Does Bihasa has a randomizer in its evaluation for the first moves or it is (absolutely) deterministic?
It has a randomizer.
I hope it's not for the whole game since that would mean it would not play optimally many moves. I guess it's just for the first 2-3 opening moves right?
Also how you can use the books? I have in its .ini:
// use book
Book ON

And i have the books in the same folder with Bihasa and yet Bihasa thinks in the opening move(s).
Why?
Strange, under console window it worked (see below). It worked also here under winboard. Note that the book is small, only 26 positions for black.
The problem seems to be with Bihasa being black. Then it never uses its book no matter what move i make.
Having white, it always uses it, but only for the first move and only by playing 1.e4. So unless it is intended to play only 1.e4 and only that to be on its book then yes i have a problem about making it using its book. :cry:

Using it from the console it's fine and plays form its book with black and with white. Strange... :?

I guess it's related with the previous problem i had that i guess i can't make it read its ini configuration file. :cry:

So i will set my values to another executable of Bihasa in a different folder with a different .ini file and match them together with your default values. It's the first time i will see if my theory is solid.
Yes that could be a possible setup.
I don't know another way anyway. :D
After his son's birth they've asked him:
"Is it a boy or girl?"
YES! He replied.....
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Problem with Bihasa

Post by Ferdy »

The problem seems to be with Bihasa being black. Then it never uses its book no matter what move i make.
I tried winboard with engine set to play gothic, everything looks fine, see winboard debug below. Use the first white move i1h3, it will reply with c7c5.

Code: Select all

StartChildProcess (dir="C:\MyFiles\Chess\engines\Capablanca\Bihasa_2.0") bihasa-2.0.exe
nice engine proc to 10
10203 >first : xboard
Load Engine (t=10883082)
recognized 'gothic' (-1) as variant gothic
Reset(1, 0) from gameMode 6
recognized 'gothic' (-1) as variant gothic
GameEnds(0, (null), 2)
shuffleOpenings = 0
TC string = ':40/180'
mps=40 tc=180000 inc=0
TC string = ':40/180'
mps=40 tc=180000 inc=0
10218 >first : force
10218 >first : new
random
10218 >first : variant gothic
10218 >first : level 40 3 0
10218 >first : post
10218 >first : hard
10218 >first : easy
10218 >first : force
10218 <first &#58; # Bihasa v2.0
10218 <first &#58; # Compiled&#58; Oct 29 2011
10218 <first &#58; # Can only play Capablanca and gothic chess variants
10218 <first &#58; 
10218 <first &#58; # Reading initialization file...
10218 <first &#58; 
10218 <first &#58; # Hash		           &#58; 49 Mb
10218 <first &#58; # Eval Cache               &#58; 16 Mb
10218 <first &#58; # Resign                   &#58; OFF
10218 <first &#58; # Resign Score             &#58; -1200
10218 <first &#58; # Resign Score Count       &#58; 5
10218 <first &#58; # Book                     &#58; ON
10218 <first &#58; # Contempt Value           &#58; 0
10218 <first &#58; # Ponder                   &#58; ON
10218 <first &#58; 
10218 <first &#58; # Pawn_Value 100 100
10218 <first &#58; # Knight_Value 315 315
10218 <first &#58; # Bishop_Value 325 325
10218 <first &#58; # Rook_Value 500 500
10218 <first &#58; # ArchBishop_Value 850 850
10218 <first &#58; # Chancellor_Value 955 960
10218 <first &#58; # Queen_Value 990 1006
10218 <first &#58; 
10218 <first &#58; # Closing initialization file...
10218 <first &#58; 
10218 <first &#58; 
10218 <first &#58; # Default chess variant is capablanca
10218 <first &#58; 
10218 <first &#58; # scanning opening book files...
10218 <first &#58; 
10218 <first &#58; # white.dbk is found!!
10218 <first &#58; # black.dbk is found!!
10218 <first &#58; 
10218 <first &#58; # end scanning book files....
10218 <first &#58; 
10218 <first &#58; 
10218 <first &#58; # received variant command gothic
10234 <first &#58; # moves per session = 40
10234 <first &#58; # time per session = 3
10234 <first &#58; # inc per move = 0
10234 <first &#58; # Total Initial Time = 180 sec.
10234 <first &#58; # Conventional Time Control.
10234 <first &#58; # Moves per session = 40 moves.
10234 <first &#58; # Minutes per game = 3.00 min.
10234 <first &#58; # Increment = 0 ms.
Reset&#40;1, 1&#41; from gameMode 6
recognized 'gothic' (-1&#41; as variant gothic
GameEnds&#40;0, &#40;null&#41;, 2&#41;
shuffleOpenings = 0
TC string = '&#58;40/180'
mps=40 tc=180000 inc=0
TC string = '&#58;40/180'
mps=40 tc=180000 inc=0
19578 >first &#58; new
random
19578 >first &#58; variant gothic
19578 >first &#58; level 40 3 0
19578 >first &#58; post
19578 >first &#58; hard
19578 >first &#58; easy
19578 <first &#58; # received variant command gothic
19594 <first &#58; # moves per session = 40
19594 <first &#58; # time per session = 3
19594 <first &#58; # inc per move = 0
19594 <first &#58; # Total Initial Time = 180 sec.
19594 <first &#58; # Conventional Time Control.
19594 <first &#58; # Moves per session = 40 moves.
19594 <first &#58; # Minutes per game = 3.00 min.
19594 <first &#58; # Increment = 0 ms.
9 0 5 9 0 5 Legality test? i1h3
CoordsToAlgebraic, piece=1 &#40;8,0&#41;-&#40;7,2&#41; -
TC string = '&#58;40/180'
mps=40 tc=180000 inc=0
MateTest&#58; K=1, my=20, his=20
move&#58; i1h3
, parse&#58; Nh3 (
)
MateTest&#58; K=1, my=20, his=20
repeat test fmm=1 bmm=0 ep=-4, reps=3
1 ep=-4
0 ep=-4
nps&#58; w=-1, b=-1
nps&#58; w=-1, b=-1
time odds&#58; 1.000000 1.000000 
22230 >first &#58; time 18000
22230 >first &#58; otim 18000
book hit = &#40;NULL&#41;
22230 >first &#58; i1h3
22230 <first &#58; # book lines read = 26
22230 <first &#58; # fen line found = 1
22230 <first &#58; 
22230 <first &#58; # From EPD Book&#58;
22230 <first &#58; # c7c5&#40;1&#41;, 
22230 <first &#58; # Book move from epd book
22230 <first &#58; 0 0 0 0 &#40;Book Move c7c5&#41;
22230 <first &#58; move c7c5
User avatar
George Tsavdaris
Posts: 1627
Joined: Thu Mar 09, 2006 12:35 pm

Re: Problem with Bihasa

Post by George Tsavdaris »

Ferdy wrote:
The problem seems to be with Bihasa being black. Then it never uses its book no matter what move i make.
I tried winboard with engine set to play gothic, everything looks fine, see winboard debug below. Use the first white move i1h3, it will reply with c7c5.
Indeed. So it's not a book problem, it is just that the book is very narrow.

Thanks, it never occurred to me playing 1.Ni1h3 since it's not a good move lol. :D

Now i have to find why it doesn't play according to the values i'm setting to the pieces. :?
I'm referring to THIS!

Yes it seems there is a definite problem in this since for example when i set:
// def=990 1006
Queen_Value 190 195

Making the Queen worth less than a Knight, when i trade Bihasa's Queen for a Knight it still thinks it's losing badly, while instead it should think it is winning as i have set the Knight to worth more than a Queen.
:?
After his son's birth they've asked him:
"Is it a boy or girl?"
YES! He replied.....
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: And also something more....

Post by Ferdy »

George Tsavdaris wrote:When i set the 2 Bihasa's 2 play each other, the default one against the one with the modified values by me, it's like my modifications of the values doesn't even exist. Bihasa seems to ignore them.

Why does it ignore its INI file? Do i have to put any extra line in Winboard.ini in order Bihasa to use its ini? Something like for example:

"bihasa2.0.exe bihasa.ini" /variant=gothic


It's strange. For example i put the modified Bihasa(the one with Queen, Chancellor and Archbishop values the same) with white and the default Bihasa with black to play from this position:

Image

And the white modified Bihasa reports a +1.40 value because obviously is happy that has traded an Archbishop with a Queen, but it should not be happy as i have set Queen's value the same with Archbishop's for the white player.
So what is going on?

I use in the ini of the white player:

// def=850 850
ArchBishop_Value 990 990

// def=955 960
Chancellor_Value 990 995

// def=990 1006
Queen_Value 990 995
The analysis seems fine, and the .ini file has been read correctly :) .
Here is a sample calculation. I will only calculate the opening values, the phase is fairly still on the opening anyway.

Code: Select all

w_modified = q+c+a-a = 990+990+990-990 = 1980
b_default = q+c+a-q = 990+955+850-990 = 1805
diff = w_modified-b_default = 1980-1805 = 175
White's search score is at +1.4 while the estimated material difference is +1.75. I see no problem with this.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Problem with Bihasa

Post by Ferdy »

George Tsavdaris wrote:
Ferdy wrote:
The problem seems to be with Bihasa being black. Then it never uses its book no matter what move i make.
I tried winboard with engine set to play gothic, everything looks fine, see winboard debug below. Use the first white move i1h3, it will reply with c7c5.
Indeed. So it's not a book problem, it is just that the book is very narrow.

Thanks, it never occurred to me playing 1.Ni1h3 since it's not a good move lol. :D

Now i have to find why it doesn't play according to the values i'm setting to the pieces. :?
I'm referring to THIS!

Yes it seems there is a definite problem in this since for example when i set:
// def=990 1006
Queen_Value 190 195

Making the Queen worth less than a Knight, when i trade Bihasa's Queen for a Knight it still thinks it's losing badly, while instead it should think it is winning as i have set the Knight to worth more than a Queen.
:?
Show me the fen and the complete material setting you think there could be a problem.
User avatar
George Tsavdaris
Posts: 1627
Joined: Thu Mar 09, 2006 12:35 pm

Re: Problem with Bihasa

Post by George Tsavdaris »

Ferdy wrote: Show me the fen and the complete material setting you think there could be a problem.
Here is the values i've put in the bihasa.ini:
------------------------------------------

// def=100 100
Pawn_Value 100 100

// def=315 315
Knight_Value 250 260

// def=325 325
Bishop_Value 300 310

// def=500 500
Rook_Value 470 500

// def=850 850
ArchBishop_Value 990 990

// def=955 960
Chancellor_Value 990 995

// def=990 1006
Queen_Value 190 195

// end of init

------------------------------------------

Here is the position(i didn't use this one before but this is easier to see):
rnbqckab1r/pppppppppp/10/10/10/10/PPPPPPPPPP/RNB1CKABNR w KQkq - 0 1

And with picture:

Image

Bihasa should rate this a plus for white since i have set the Queen to 190 and the Knight to 250 and yet it rates it as it is completely losing, as obviously it rates the Queen much higher than the Knight, i guess because it has its default settings and not the modified one's.
After his son's birth they've asked him:
"Is it a boy or girl?"
YES! He replied.....
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Problem with Bihasa

Post by Ferdy »

George Tsavdaris wrote:
Ferdy wrote: Show me the fen and the complete material setting you think there could be a problem.
Here is the values i've put in the bihasa.ini:
------------------------------------------

// def=100 100
Pawn_Value 100 100

// def=315 315
Knight_Value 250 260

// def=325 325
Bishop_Value 300 310

// def=500 500
Rook_Value 470 500

// def=850 850
ArchBishop_Value 990 990

// def=955 960
Chancellor_Value 990 995

// def=990 1006
Queen_Value 190 195

// end of init

------------------------------------------

Here is the position(i didn't use this one before but this is easier to see):
rnbqckab1r/pppppppppp/10/10/10/10/PPPPPPPPPP/RNB1CKABNR w KQkq - 0 1

And with picture:

Image

Bihasa should rate this a plus for white since i have set the Queen to 190 and the Knight to 250 and yet it rates it as it is completely losing, as obviously it rates the Queen much higher than the Knight, i guess because it has its default settings and not the modified one's.
This is a good example and I can confirm that there is a bug indeed. The initialization file was read successfully but values read was later overwritten due to the scheme I revised for CLOP. I will fix this within this year :) , thanks and Advance Merry Christmas.
User avatar
George Tsavdaris
Posts: 1627
Joined: Thu Mar 09, 2006 12:35 pm

Re: Problem with Bihasa

Post by George Tsavdaris »

Till now it is:

Code: Select all

#        Name             Points  
1         Me               3.5 / 4.0
2 Gothic Vortex 2.2.5      2.5 / 4.0
3     Bihasa 2.0           0.0 / 4.0
Me-GV 1-0
GV-Bihasa 1-0
Bihasa-Me 0-1

GV-Me 1/2-1/2
Bihasa-GV 0-1
Me-Bihasa 1-0

Bihasa seemed to have played better than GV in both 2 games, yet it lost! :?
I also saw that playing against Bihasa is more difficult than against GV, yet i lost half point against GV and none against Bihasa.
I will give more info and the games after i play more games....
After his son's birth they've asked him:
"Is it a boy or girl?"
YES! He replied.....
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Problem with Bihasa

Post by Ferdy »

George Tsavdaris wrote:Till now it is:

Code: Select all

#        Name             Points  
1         Me               3.5 / 4.0
2 Gothic Vortex 2.2.5      2.5 / 4.0
3     Bihasa 2.0           0.0 / 4.0
Me-GV 1-0
GV-Bihasa 1-0
Bihasa-Me 0-1

GV-Me 1/2-1/2
Bihasa-GV 0-1
Me-Bihasa 1-0

Bihasa seemed to have played better than GV in both 2 games, yet it lost! :?
I also saw that playing against Bihasa is more difficult than against GV, yet i lost half point against GV and none against Bihasa.
I will give more info and the games after i play more games....
Thanks, I am actually re-tuning my reduction conditions and margins to see if I could improve. I get an improvement by increasing the win eval margin so that it will prune search once it is more clearer that it is winning. I also increase my futility margin which seems a little bit small considering that this variant have additional stronger pieces.