Bridgit is a bot (computer algorithm) for bidding Bridge hands. It has been developed by Ralph Lipe in collaboration with Trickster Cards. Bridgit currently supports a basic 2/1 system, implementing a subset of "LC Standard". Other systems and configurable conventions are planned for future updates.
Bridgit is available in preview as part of Trickster Cards. To use it, go to "More Games / Rules" and set "Bidding" to "2/1" before creating your game. Then all bids by computer opponents/partners as well as suggestions for your own bids will be provided by Bridgit.
Bridgit is available under the MIT license and developed in C# targeting .NET Standard 2.0 to allow broad use. It can be referenced directly by existing .NET projects targeting .NET Framework 4.8, .NET 8, or anything in between.
Bridgit uses simple string arguments derived from Portable Bridge Notation (PBN). This facilitates wrapping it in a basic REST endpoint, though currently you must provide your own wrapping implementation.
Contributions from the community are welcome, especially in the form of test cases in PBN format. When logging an issue, please include what Bridgit currently does, what it should do instead, and why.
If you're playing with Bridgit on Trickster Cards, you can automatically export the deal, bids and plays for the current hand in PBN format. First enable "Review last deal" when setting up your game (also under "More Games / Rules"). Then during the review step after finishing a hand, open the main menu, go to "Current Game" and choose "Export Hand to PBN".
Those wishing to contribute code and run tests can do so on any major desktop operating system (Linux, Mac, or Windows). You'll need the following tools installed:
Create and clone a fork of this repository from which to submit pull requests. If you're not familiar with GitHub's pull request process you can learn about using GitHub Desktop to accomplish this here:
After installing the requirements and cloning this repository, open the cloned folder in Visual Studio Code. This will open a solution with 2 projects: BridgeBidder and TestBridgeBidder. You should be prompted to install the "C# Dev Kit" extension; do so to enable the integrated test runner. Then look for the "Solution Explorer" below the list of open files. Right-click on the solution or a contained project to choose to build it.
Unit testing is done using the TestBridgeBidder project. These are the tests that will run automatically against any pull requests. You can use the Testing tab (with a beaker icon) in Visual Studio Code to run the full suite or individual tests on your own machine. Tests are automatically generated from PBN files under the TestBridgeBidder/TwoOverOneGameForce folder. Simply add new PBN content to an existing *.pbn
file or add new *.pbn
files to add new tests. Test names are derived from the file name and [Event]
tag in the PBN.