lorserker/ben

Explanation for training/bidding needed - Update documentation

Closed this issue · 1 comments

Discussed in #99

Originally posted by ThePokerDude March 3, 2024
Hi,
I read the training/bidding/README.md

_- KT53.KQ7.KJ876.5
and is translated to:

  • 0 1 0 0 1 0 0 2 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 2 0 0 0 0 0 0 0 1
    So starting from Ace of spades, and each suit ends with a value for number of small cards from 2-7._

Here everything is clear to me: SA = false, KS = true, QS = false, JS = false, TS = true, 9S = false, 8S = false, 2-7S count = 2
and then hearts, diamonds and clubs

_So starting from Ace of spades, and each suit ends with a value for number of small cards from 2-7.
In a deck there is 40 high card points (hcp), and the hcp is calculated for each hand. The values are linear normalized.
The shape of a hand is the length in the 4 suits, and again it is normalized (also known as z-score or standardization)
So we end up representing the hand as

  • [ 0, 0, -1.25, -0.14, -0.14, -0.14, 0.43, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1]_

here I am lost. I marked the representation of KT53.KQ7.KJ876.5 in bold. And I understand that 0, 0, -1.25, -0.14, -0.14, -0.14, 0.43
represents the 12 HCP the 4-3-5-1 distribution but I cannot recognize what is what. Could you explain?

1st = ?
2nd = ?
3rd = ?
4th = ?
5th = ?
6th = ?
7th = ?
8-39 exact cards

_A single bid is represented as an array with 40 elements, where only 1 item is 1, and the rest is zero (a One-Hot array), as this will help the neural network. The values of the Hot-array is

0 = PAD_START
1 = PAD_END
2 = PASS
3 = Double
4 = Redouble
5-40 = Bids, starting from 1C and ending at 7N,_

But 0 to 40 are 41 elements and not 40. So I think 7NT could not be represented, which can get unnoticed because it' very rare.

_So we now have the input record for a bid as this

[ 0, 0, 0.5, -0.71, 0.43, -0.14, 0.43,
0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]_

So the input record for a bid consists of the reprentation of a hand and the representation of a bid?
It seems to me as
0, 0, 0.5, -0.71, 0.43, -0.14, 0.43, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2
represents the east hand.
But what is the rest? It looks like 3 arrays of 40 elements for where the first element is 1.
I do not know how to interpret it: PAD_START, PAD_START, PAD_START?
Let's assume I' right and it's 41 and not 40 elements. Shouldn't it look like this:

[ 0, 0, 0.5, -0.71, 0.43, -0.14, 0.43,
0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

1st: east hand represtation, 2nd: PAD_START, 3rd: pass, 4th: PAD_END?

And the expected output as this:
[0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
as the hand would pass (Element 3 is hot).

Why should the east hand Q7.AT43.QT3.AT63 pass with its 12 HCP?

Documentation updated