chiark / gitweb /
cp: Tweak guess selection algorithm: minimize largest bin. max-bin max-bin/maxbin
authorMark Wooding <mdw@distorted.org.uk>
Sun, 12 Mar 2006 16:28:51 +0000 (16:28 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 12 Mar 2006 17:28:15 +0000 (17:28 +0000)
commitca85e2e72271e7ec90e9318c79aeda3eba629c09
tree9b462be27528476dd7dc27764bfa148831535543
parent0fd4f3753c6a4e596f4635ac75fdb1e3730ede64
cp: Tweak guess selection algorithm: minimize largest bin.

The computer player analyses guesses by trying each possible guess
prototype and dividing the remaining code candidates into bins according
to the possible ratings for the guess.

Previously, we'd choose the guess which minimizes the square-sum of the
bin sizes.  This change makes it choose the guess which minimizes the
size of the largest bin.

This is simpler to compute (it can be done in integers -- the least
squares code used doubles to avoid overflow).  Unfortunately, the play
is somewhat poorer, even though it's often faster.
mm.c