pasky / pachi

A fairly strong Go/Baduk/Weiqi playing program
http://pachi.or.cz/
GNU General Public License v2.0
514 stars 117 forks source link

t-unit + side ladder fixes #37

Closed lemonsqueeze closed 8 years ago

lemonsqueeze commented 8 years ago

Hi,

This one fixes a nasty side ladder issue that came up in a game, adds a ladder unit test (ladder.t) and some minor t-unit improvements : sanity checks, new board format with spaces (infinitely nicer to work with !) and displays some stats at the end.

There's a t-unit/to_new_format script to convert old sar.t files if needed.

The side ladder looked like this:

. . O . . . .
. . O X X X X
. O X O . . .
. O X X O . .
. X X O . . .
. O O . . . .
. . . . . . .
pasky commented 8 years ago

Thanks! It's an itneresting catch, but do you have any playtesting results for this?

I don't think it's obviously good, because you are calling can_countercapture(), potentially a pretty expensive routine, in a code path that should be relatively fast otherwise.

lemonsqueeze commented 8 years ago

Yes, not sure why i put it here, i'll move it inside is_border_ladder() looks better there.

For playtesting do you mean strength or speed ? I was worried it might impact performance too, but i get same playout speed with or without it. (ladder code isn't used much in playouts though iirc) It doesn't seem to impact strength much either (on kgs at least), i guess it's quite a rare case ... I can play more games if necessary.

lemonsqueeze commented 8 years ago

moved check inside is_border_ladder()

pasky commented 8 years ago

Ok, if the speed is the same, that's great to hear! Thanks.