Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inference engine - Add new bridge bidding bot. #216

Closed
wants to merge 74 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
438fa8b
Transfers working
RalphLipe Dec 3, 2022
bd94ad4
Don't know what is causing } problem but comiting this file too.
RalphLipe Dec 3, 2022
55d45a7
Initial Interpreter State Machine
RalphLipe Dec 5, 2022
a6b2a3c
Code in place - need to wire it in for NT responses
RalphLipe Dec 29, 2022
c0875c7
Transfers work properly
RalphLipe Jan 5, 2023
e147d08
Stayman not using state machine
RalphLipe Jan 10, 2023
b20f858
Clean Up NoTrump code
RalphLipe Jan 13, 2023
d757490
1NT overcall working
RalphLipe Jan 13, 2023
a7004da
Clean up NT conventions.
RalphLipe Jan 16, 2023
3793a9a
Major clean-up of NT
RalphLipe Jan 28, 2023
f6bb6fa
Implement non-forcing 5/4 Invitational Stayman
RalphLipe Jan 28, 2023
0c0affd
Clean up stayman
RalphLipe Jan 29, 2023
12487bf
Removed Cappelletti
RalphLipe Jan 29, 2023
c041718
Added PointsAdjustment
RalphLipe Jan 30, 2023
d73fe95
Removed dead NT response code
RalphLipe Jan 30, 2023
2583fc3
Balancing 1NT Working
RalphLipe Feb 13, 2023
84285fb
Merge remote-tracking branch 'upstream/main' into statemachine
RalphLipe Feb 13, 2023
e9609ba
Changed test count to 470 for sayc tests
RalphLipe Feb 13, 2023
853b080
Partial implementation of new bidding
RalphLipe Mar 29, 2023
858e8d4
Not working, but want to commit for backup purposes
RalphLipe Apr 11, 2023
00fd13c
More progress. Want to get it to github so I don't lose it
RalphLipe Apr 15, 2023
cc9bb71
More progress to save. Still not compiling.
RalphLipe Apr 17, 2023
4ef8626
Still more massive changes.
RalphLipe Apr 17, 2023
8ddf761
Opening bids are actually working!!!!
RalphLipe Apr 20, 2023
cc37a43
Basic bids actually work
RalphLipe Apr 24, 2023
bb0ac74
Some basic tests are actually working!
RalphLipe Apr 26, 2023
0286219
Jump bids work. Stayman works.
RalphLipe Apr 27, 2023
8d9a094
More name changes. Bid state updated recursively until stabalizes
RalphLipe Apr 28, 2023
1fdd1ee
More tests working!
RalphLipe Apr 28, 2023
e9e6acc
More NT conventions passing.
RalphLipe May 1, 2023
2955a73
CueBid working. Partner Summary partially implementd
RalphLipe May 3, 2023
c38f06a
1NT tests all passing!
RalphLipe May 7, 2023
2556608
ALL PBN TESTS PASS!!!
RalphLipe May 8, 2023
469e1f9
Totally broken - 1/2 way through clean up.
RalphLipe May 11, 2023
83c0322
Most tests actually work!
RalphLipe May 13, 2023
96305e4
Found nutty bug in redirect code
RalphLipe May 14, 2023
ee2522d
More cleanup. All Bridge Basics tests pass (at least for bidding)
RalphLipe May 19, 2023
e7c640e
All tests are working (except those tests that are wrong)
RalphLipe May 24, 2023
5bf64f5
Even more test pass
RalphLipe May 26, 2023
e6af074
ShowsSuit now doing something. PairPoints using appropriate point ra…
RalphLipe May 27, 2023
7026f42
More tests working. Points further refined
RalphLipe May 29, 2023
7167374
Beginning of turning conventions on/off
RalphLipe May 31, 2023
3aa8d65
More progress on making convention rules have higher priority
RalphLipe May 31, 2023
0350878
All of Bridge Basics 1 sample hands
RalphLipe Jun 2, 2023
44bb5ea
More PBN Tests. Start of Michaels
RalphLipe Jun 6, 2023
f85dedb
New hands
RalphLipe Jun 7, 2023
0f8f77c
Mid major change. Broken but need to get to other computer for more …
RalphLipe Jun 11, 2023
9f288e0
Broken, but some tests pass and no crashes so checking in changes.
RalphLipe Jun 26, 2023
5e8f8cf
Builds! Now simpler and more complex sets of rules allowed
RalphLipe Jul 27, 2023
cc3523d
Basic tests pass now....
RalphLipe Jul 30, 2023
59901ad
Contract is now a property
RalphLipe Aug 2, 2023
0390907
More stuff to move to laptop...
RalphLipe Aug 3, 2023
b2012d3
Many tests passing. They at least all run to completion...
RalphLipe Aug 9, 2023
047db2b
More tests passing
RalphLipe Aug 10, 2023
cf6e0aa
Massive cleanup. Back to working again. Tests passing at same rate.
RalphLipe Aug 16, 2023
ad0a27f
All of BridgeBasics2 in pbn test file. More clean up. Defined Biddi…
RalphLipe Aug 17, 2023
bf850a7
All system bidding now in its own directory.
RalphLipe Aug 18, 2023
bb268a3
Three more tests pass.
RalphLipe Aug 20, 2023
43ff880
First 12 hands of Bridge Basics 3
RalphLipe Aug 20, 2023
cb74e84
All Bridge Basics hands now in tests
RalphLipe Aug 22, 2023
6e51477
Start of Blackwood
RalphLipe Aug 29, 2023
c20d64b
Blackwood is started
RalphLipe Sep 14, 2023
9d5a492
Many more test passing
RalphLipe Oct 24, 2023
03ef53f
Basic web services tie-in
RalphLipe Nov 9, 2023
ce34c70
Merge branch 'main' into InferenceEngine
antross Nov 29, 2023
1947855
Wire up option to use RLBot
antross Nov 29, 2023
8fbaac4
Slight cleanup
johnson520 Nov 29, 2023
fd21fb2
Add another failing response to a forcing bid
antross Nov 29, 2023
2aef060
Merge branch 'InferenceEngine' of https://github.com/TricksterCards/T…
antross Nov 29, 2023
9e18ef1
Merge pull request #1 from TricksterCards/InferenceEngine
RalphLipe Nov 30, 2023
e8a172c
Add another failing test
antross Nov 30, 2023
bec5120
Broke all dependencies to Trickster classes
RalphLipe Dec 14, 2023
f287988
No takeout double over NT opener
RalphLipe Dec 15, 2023
25a3661
Fixed 4NT advance test. Broke another
RalphLipe Dec 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TestBots/Bridge/BasicTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public static class BasicTests
new BasicTest
{
history = new[] { "1NT", "Pass", "2♣", "Pass" },
hand = "TC9C ADKDTD9D TH9H8H7H ASKSTS", // 14 HCP, 14 total
hand = "TC9C ADKDTD9D TH9H8H7H ASKSJS", // 15 HCP, 15 total
bid = "2♥",
type = "Opener Rebid (Answer Stayman)"
},
Expand Down
65 changes: 61 additions & 4 deletions TestBots/Bridge/SAYC/1NT Basic.pbn
Original file line number Diff line number Diff line change
@@ -1,23 +1,80 @@
% Cleaned by CleanPBN on 11/29/2023 at 11:52 AM
[Event "1NT Opening - All Pass"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:K43.QJ3.AK32.Q85 QJT9.K98.JT9.AJ4 765.752.654.T932 A82.AT64.Q87.K76"]
[Declarer "N"]
[Contract "1NT"]
[Auction "N"]
1NT Pass Pass Pass

[Event "1NT Opening, Invite to game, Invitation refused"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:K43.QJ3.AK32.Q85 Q96.T942.QJ.K763 JT7.A85.T754.A92 A852.K76.986.JT4"]
[Declarer "N"]
[Contract "2NT"]
[Auction "N"]
1NT Pass 2NT Pass
Pass Pass

[Event "1NT, Invite, Invitation Accepted"]
[Deal "S:A87.KQ4.T984.972 K53.952.Q53.QT43 QT964.A76.AK2.A6 J2.JT83.J76.KJ85"]
[Event "1NT, Invite, Show Major, Play in 4S"]
[Dealer "S"]
[Vulnerable "None"]
[Deal "S:A873.KQ4.T98.972 K5.952.Q543.QT43 QT964.A76.AK2.A6 J2.JT83.J76.KJ85"]
[Declarer "N"]
[Contract "4S"]
[Auction "S"]
Pass Pass 1NT Pass
2NT Pass 3NT Pass
Pass Pass
2NT Pass 3S Pass
4S Pass Pass Pass

[Event "1NT, Sign-off at Game"]
[Dealer "W"]
[Vulnerable "None"]
[Deal "W:Q654.842.Q9.QJT7 AK.J9763.KJ8.K82 J832.KT.AT5.9653 T97.AQ5.76432.A4"]
[Declarer "N"]
[Contract "3NT"]
[Auction "W"]
Pass 1NT Pass 3NT
Pass Pass Pass

[Event "1NT, Invite Game, Accept"]
[Dealer "S"]
[Vulnerable "None"]
[Deal "S:J98.A53.J874.Q82 T742.Q76.T63.AJ9 AQ6.KJT4.A92.KT6 K53.982.KQ5.7543"]
[Auction "S"]
Pass Pass 1NT Pass
2NT Pass 3NT Pass
Pass Pass

[Event "1NT, Invite, Show Hearts, Play in 3N"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:AK.J7643.KQ8.KT8 J975.K98.652.AJ5 832.AQ.JT93.Q764 QT64.T52.A74.932"]
[Declarer "N"]
[Contract "3NT"]
[Auction "N"]
1NT Pass 2NT Pass
3H Pass 3NT Pass
Pass Pass

[Event "1NT overcall - Basic"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:JT7.QJT75.QT.AQJ A62.AK8.A632.T72 983.42.J984.9863 KQ54.963.K75.K54"]
[Declarer "E"]
[Contract "3NT"]
[Auction "N"]
1H 1NT Pass 3NT
Pass Pass Pass

[Event "Simple Overcall by Opponents"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:AJ64.T42.KQ8.AQT Q.AQ8653.AJ5.J75 T75.J97.732.9862 K9832.K.T964.K43"]
[Declarer "E"]
[Contract "2H"]
[Auction "N"]
1NT 2H Pass Pass
Pass
157 changes: 157 additions & 0 deletions TestBots/Bridge/SAYC/1NT Stayman.pbn
Original file line number Diff line number Diff line change
@@ -1,27 +1,184 @@
% Cleaned by CleanPBN on 11/29/2023 at 11:52 AM
[Event "1NT Opening - Stayman - No Major - Invite - Refused"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:K43.QJ3.AK32.Q85 T98.A74.865.A742 AJ65.T985.JT4.KT Q72.K62.Q97.J963"]
[Declarer "N"]
[Contract "2NT"]
[Auction "N"]
1NT Pass 2C Pass
2D Pass 2NT Pass
Pass Pass

[Event "1NT Open - Stayman - No Major - Game"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:K43.QJ3.AK32.Q85 972.KT6.986.A976 AJ65.A985.JT4.KT QT8.742.Q75.J432"]
[Declarer "N"]
[Contract "3NT"]
[Auction "N"]
1NT Pass 2C Pass
2D Pass 3NT Pass
Pass Pass

[Event "1NT - Stayman - Spade Fit - Game Invite - Refused"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:AK98.J4.KJ74.QJT Q7.KQT9.QT62.964 JT32.8765.A3.K32 654.A32.985.A875"]
[Declarer "N"]
[Contract "3S"]
[Auction "N"]
1NT Pass 2C Pass
2S Pass 3S Pass
Pass Pass

[Event "1NT - Stayman - Spade Fit - Game in Spades"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:AK98.J4.KJ74.QJT 3.KT32.QT65.A985 QJT2.8765.A3.K32 7654.AQ9.982.764"]
[Declarer "N"]
[Contract "4S"]
[Auction "N"]
1NT Pass 2C Pass
2S Pass 4S Pass
Pass Pass

[Event "Stayman, Fit Hearts, Invite, Accept"]
[Dealer "W"]
[Vulnerable "None"]
[Deal "W:Q92.K94.Q87.Q876 A843.A763.A9.A94 765.T8.K652.KJ53 KJT.QJ52.JT43.T2"]
[Declarer "N"]
[Contract "4H"]
[Auction "W"]
Pass 1NT Pass 2C
Pass 2H Pass 3H
Pass 4H Pass Pass
Pass

[Event "Stayman, Hearts, Invite 2NT, Spades, Dummy points make game in Spades"]
[Dealer "S"]
[Vulnerable "None"]
[Deal "S:QJ84..T7653.KQT5 532.Q8432.A2.A74 K976.AKJ6.QJ.J83 AT.T975.K984.962"]
[Declarer "N"]
[Contract "4S"]
[Auction "S"]
Pass Pass 1NT Pass
2C Pass 2H Pass
2NT Pass 3S Pass
4S Pass Pass Pass

[Event "Stayman not used with 4333 - Invite"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:K32.JT4.AQJ.AT96 T975.A96.943.K75 QJ6.K873.765.QJ8 A84.Q52.KT82.432"]
[Declarer "N"]
[Contract "2NT"]
[Auction "N"]
1NT Pass 2NT Pass
Pass Pass

[Event "Stayman not used 4333 - Invite accepted"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:A98.A73.AJT.A642 QT4.KJ95.984.T97 J652.842.KQ3.QJ3 K73.QT6.7652.K85"]
[Declarer "N"]
[Contract "3NT"]
[Auction "N"]
1NT Pass 2NT Pass
3NT Pass Pass Pass

[Event "Stayman not used - Game"]
[Dealer "W"]
[Vulnerable "None"]
[Deal "W:QT72.742.A84.T75 KJ6.AJ5.QT65.KJ6 93.9863.K92.A832 A854.KQT.J73.Q94"]
[Declarer "N"]
[Contract "3NT"]
[Auction "W"]
Pass 1NT Pass 3NT
Pass Pass Pass

[Event "5/4 Majors. Stayman. Game in 5-card major"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:A75.KQ4.JT862.AQ J98.62.AQ53.9842 KQ42.AJT87.4.JT6 T63.953.K97.K753"]
[Declarer "S"]
[Contract "4H"]
[Auction "N"]
1NT Pass 2C Pass
2D Pass 3H Pass
4H Pass Pass Pass

[Event "5/4 Majors. Stayman. Game in 4 card major."]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:QJ2.QJ76.AQ6.K95 987.92.T952.AQT3 K6543.AKT4.J7.J8 AT.853.K843.7642"]
[Declarer "N"]
[Contract "4H"]
[Auction "N"]
1NT Pass 2C Pass
2H Pass 4H Pass
Pass Pass

[Event "5/4 Majors. Stayman. No fit found. Play 3NT"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:KT7.KJ.AJ76.KQ64 Q82.T86.QT2.JT32 A943.A9742.94.A8 J65.Q53.K853.975"]
[Auction "N"]
1NT Pass 2C Pass
2D Pass 3H Pass
3NT Pass Pass Pass

[Event "Stayman, 4-4 majors. Game in spades"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:J754.QT64.QJ.AKQ K962.A83.86.JT42 AQ83.J9.KT7532.3 T.K752.A94.98765"]
[Declarer "N"]
[Contract "4S"]
[Auction "N"]
1NT Pass 2C Pass
2H Pass 3NT Pass
4S Pass Pass Pass

[Event "Non-Forcing Stayman, 5/4, Reject invitation"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:KT5.AK8.KT965.Q5 A6.765.873.AT763 QJ732.JT43.A2.42 984.Q92.QJ4.KJ98"]
[Declarer "S"]
[Contract "2S"]
[Auction "N"]
1NT Pass 2C Pass
2D Pass 2S Pass
Pass Pass

[Event "Invitatinal 5/4, Invite accepted in Hearts"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:JT2.A93.AJ.AQJ76 98.JT2.KT754.KT2 AQ73.Q8765.32.83 K654.K4.Q986.954"]
[Declarer "S"]
[Contract "4H"]
[Auction "N"]
1NT Pass 2C Pass
2D Pass 2H Pass
4H Pass Pass Pass

[Event "Invitational 5/4, Rejected, Play in 2NT"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:KQ.AKJ.T9764.Q92 A63.965.QJ5.J654 T8542.T832.A2.A7 J97.Q74.K83.KT83"]
[Declarer "N"]
[Contract "2NT"]
[Auction "N"]
1NT Pass 2C Pass
2D Pass 2S Pass
2NT Pass Pass Pass

[Event "Invitational 5/4, Accept invitation, play in 3NT"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:AQJ.A4.T732.KQT6 762.T72.K64.A832 T943.KQJ95.Q8.95 K85.863.AJ95.J74"]
[Declarer "N"]
[Contract "3NT"]
[Auction "N"]
1NT Pass 2C Pass
2D Pass 2H Pass
3NT Pass Pass Pass
69 changes: 67 additions & 2 deletions TestBots/Bridge/SAYC/1NT Transfers.pbn
Original file line number Diff line number Diff line change
@@ -1,46 +1,111 @@
% Cleaned by CleanPBN on 11/29/2023 at 11:52 AM
[Event "Transfer to spades minimum hand"]
[Deal "N:KT97.KQJ.KQ5.J97 A6.9652.AT6.QT52 J5432.A4.J98.863 Q8.T873.7432.AK4"]
[Auction "N"]
1NT Pass 2H Pass
2S Pass Pass Pass

[Event "Transfer to Spades - Invitational, Refused"]
[Deal "N:KT9.KQJ7.KQ5.J97 5.T983.AJT4.A643 AQ432.654.32.K85 J876.A2.9876.QT2"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:KT9.KQJ7.KQ5.J97 5.T983.AJT4.A643 AQ432.654.32.Q85 J876.A2.9876.KT2"]
[Auction "N"]
1NT Pass 2H Pass
2S Pass 2NT Pass
3S Pass Pass Pass

[Event "Spade Transfer, Invitation accepted"]
[Deal "N:AK3.QJ98.AJ5.Q74 542.764.K763.A32 JT986.AT3.82.KJ5 Q7.K52.QT94.T986"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:AK3.QJ98.AJ5.Q74 542.764.K763.A32 JT986.AT3.82.K65 Q7.K52.QT94.JT98"]
[Auction "N"]
1NT Pass 2H Pass
2S Pass 2NT Pass
4S Pass Pass Pass

[Event "Super Accept Heart Transfer, Accepted"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:KJ6.JT76.AJ83.AK Q932.K8.Q76.J962 75.AQ432.952.T84 AT84.95.KT4.Q753"]
[Declarer "N"]
[Contract "4H"]
[Auction "N"]
1NT Pass 2D Pass
3H Pass 4H Pass
Pass Pass

[Event "Super Accept, Declined"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:KJ6.JT76.AJ83.AK A985.92.Q54.Q652 32.K8543.T97.984 QT74.AQ.K62.JT73"]
[Auction "N"]
1NT Pass 2D Pass
3H Pass Pass Pass

[Event "Transfer, Game Force, Play 3NT"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:KQ.AJ43.K84.K742 652.T92.Q52.A963 AT984.K85.A973.T J73.Q76.JT6.QJ85"]
[Declarer "N"]
[Contract "3NT"]
[Auction "N"]
1NT Pass 2H Pass
2S Pass 3NT Pass
Pass Pass

[Event "Transfer, Game Force, Play 4S"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:KQ5.AJ43.Q4.K874 J76.Q92.JT2.QJ53 AT984.K85.A973.T 32.T76.K865.A962"]
[Declarer "N"]
[Contract "4S"]
[Auction "N"]
1NT Pass 2H Pass
2S Pass 3NT Pass
4S Pass Pass Pass

[Event "Transfer to Clubs"]
[Dealer "W"]
[Vulnerable "None"]
[Deal "W:8643.A652.Q832.A AKQ.T98.KJ5.KJ65 T952.KQJ3.974.Q4 J7.74.AT6.T98732"]
[Declarer "N"]
[Contract "3C"]
[Auction "W"]
Pass 1NT Pass 2S
Pass 3C Pass Pass
Pass

[Event "Transfer to Diamonds"]
[Dealer "W"]
[Vulnerable "None"]
[Deal "W:8532.AQ52.Q6.984 AKQ.T98.KJ5.KJ65 T964.KJ63.A4.Q73 J7.74.T98732.AT2"]
[Declarer "S"]
[Contract "3D"]
[Auction "W"]
Pass 1NT Pass 2S
Pass 3C Pass 3D
Pass Pass Pass

[Event "Opener Suggest 2nd Major after Transfer - Accepted by responder"]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:KJ.Q9654.KQJ.AJT Q96.T3.AT94.8754 A8543.KJ2.753.96 T72.A87.862.KQ32"]
[Declarer "S"]
[Contract "4H"]
[Auction "N"]
1NT Pass 2H Pass
2S Pass 2NT Pass
3H Pass 4H Pass
Pass Pass

[Event "Opener suggest 2nd Major after transfer - Rejected. Play 3NT"]
[Dealer "S"]
[Vulnerable "None"]
[Deal "S:A8543.KJ.753.T62 QT9.T8.AT64.8753 KJ.Q9654.KQJ.A94 762.A732.982.KQJ"]
[Declarer "N"]
[Contract "3NT"]
[Auction "S"]
Pass Pass 1NT Pass
2H Pass 2S Pass
2NT Pass 3H Pass
3NT Pass Pass Pass
Loading
Loading