EdwardPiwowar / BBA

2 stars 0 forks source link

Using EPBot to get an explanation #623

Closed ThorvaldAagaard closed 2 weeks ago

ThorvaldAagaard commented 2 weeks ago

I am using this:

        position = 0
        partner_position = 2
        dealer = 0
        vulnerability = 0
        Player(position).system_type(0) = 0
        Player(position).system_type(1) = 0
        Player(position).scoring = 0

        Player(position).new_hand(position, hand(position).suit, dealer, vulnerability)
        Player(position).set_bid(0, 0)
        Player(position).set_bid(1, 5)
        Player(position).set_bid(2, 0)
        Player(position).set_bid(3, 7)

        '---interpret the potential bid (C_INTERPRETED = 13) - the new bid is not set yet
        Player(position).interpret_bid(9)

        meaning = Player(position).info_meaning(C_INTERPRETED)
        Console.WriteLine(meaning)

        info = Player(position).info_feature(C_INTERPRETED)
        Console.WriteLine(info(102))
        Console.WriteLine(info(103))
        Console.WriteLine(info(144))

So the bidding goes P-P-1C-P 1H-? And I would like to explain what 1N is showing From the above I get this output image

Any idea about, what I am missing (EPBot version 19)

EdwardPiwowar commented 2 weeks ago

Try command call Player(position).get_bid before Player(position).interpret_bid(9)

and you enter p-1c-p-1h whot is different P-P-1C-P-1H-? but I think it is mistake.

ThorvaldAagaard commented 2 weeks ago

Yes, I changed it to be the player to bid be North So P-1C-P-1H-? is where I would like the explanation for 1N

But I am not interested in getting the bid from BBA, I am interested in getting the meaning of the bid. So I should probably just make the bid, and the get the explanation.

So I added

Player(position).set_bid(0, 7)

But now is explanation blank and if not interpreted hcp range is 0-37 and if interpreted range is 15-17

EdwardPiwowar commented 2 weeks ago

Your code works for me

        position = 0
        partner_position = 2
        dealer = 0
        vulnerability = 0
        Player(position).system_type(0) = 0
        Player(position).system_type(1) = 0
        Player(position).scoring = 0

        Player(position).new_hand(position, hand(position).suit, dealer, vulnerability)
        Player(position).set_bid(0, 0)
        Player(position).set_bid(1, 5)
        Player(position).set_bid(2, 0)
        Player(position).set_bid(3, 7)

        '---interpret the potential bid (C_INTERPRETED = 13) - the new bid is not set yet
        Player(position).interpret_bid(9)

        meaning = Player(position).info_meaning(C_INTERPRETED)
        Console.WriteLine(meaning)

        info = Player(position).info_feature(C_INTERPRETED)
        Console.WriteLine(info(102))
        Console.WriteLine(info(103))
        Console.WriteLine(info(144))

        Console.ReadKey()

Unusual 1NT 7 10 9

ThorvaldAagaard commented 2 weeks ago

Great, and you are using version 19? I am using EPBot86 image

I am attaching the entire file (remove extension .txt)

[Program.vb.txt](Program.vb (1).txt)

EdwardPiwowar commented 2 weeks ago

I think so image

ThorvaldAagaard commented 2 weeks ago

Then it could be the input of hand Will you run the program?

EdwardPiwowar commented 2 weeks ago

Add any hand

        Dim str_hand As String
        Dim blocks() As String
        Dim subblocks() As String
        '---example deal
        str_hand = "Q.K6.AQT6.KQT852 T642.Q982.842.73 AK85.T5.J975.AJ6 J973.AJ743.K3.94"
        blocks = Split(str_hand, " ")
        For k = 0 To 3
            subblocks = Split(blocks(k), ".")
            For i = 0 To 3
                hand(k).suit(i) = subblocks(3 - i)
            Next i
        Next k

and run Player(position).interpret_bid(9) you have rem.

EdwardPiwowar commented 2 weeks ago

Me I guess I should introduce a default hand.

ThorvaldAagaard commented 2 weeks ago

I ended up just adding a random hand for the player in focus. When adding all 4 hands it failed, but it seems to be working now

EdwardPiwowar commented 2 weeks ago

The next DLL will not require the default hand.