Git Product home page Git Product logo

bridge's People

Contributors

eieioace avatar kdblocher avatar sievers2501 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

eieioace bsalita

bridge's Issues

Feature to see how often the hand pattern occurs

On the section where it show how many hands were generated, it would be great to see the frequency. For example,, if I run 10000 hands, and get 17 matches, it would be great to see (1 in 588.2). Not that I can estimate the math in my head, but we have computers to do that more quickly.

Shape table

This was something I could whip up pretty quick. Somewhere in our master table, we will store a small int referencing a hand shape. That smallint will point to the ID of a shape_table. Creating that table can be done with the following SQL code.

IF OBJECT_ID('tempdb..#nums','U') IS NOT NULL
DROP TABLE #nums
IF OBJECT_ID('shape_table','U') IS NOT NULL
DROP TABLE shape_table

CREATE TABLE #nums (suit_count tinyint)

CREATE TABLE shape_table (
	id smallint PRIMARY KEY CLUSTERED IDENTITY(1,1),
	spade_length tinyint,
	heart_length tinyint,
	diamond_length tinyint,
	club_length tinyint
	)

INSERT INTO #nums (suit_count)
VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13)

INSERT INTO shape_table
SELECT	
	d.suit_count as spade_length,
	c.suit_count as heart_length,
	b.suit_count as diamond_length,
	a.suit_count as club_length
FROM #nums d
CROSS JOIN #nums a
CROSS JOIN #nums b
CROSS JOIN #nums c
WHERE a.suit_count + b.suit_count + c.suit_count + d.suit_count = 13

SELECT *
FROM shape_table

Support priority

Can we specify 1C opening like 16+ notFit(1N) notFit(2N)? If we choose to change 2N point range we don't need to modify 1C

Generate deals buttons gets out of sync with results matrix

So just for a quick test, I entered the following: 1H: 15-17 BAL H1

I ran a few thousand hands, and got 22 results, and then found the DDS averages. But when I went to generate more hands, it seemed to add the new number of hands to the number of hands I already had rather than giving a new results set. That's fine if it's supposed to be cumulative, but the results matrix never updates. The values are left as they were after my first "generate deals" run.

Add "M" for major, and "m" for minor

In the sample SAYC that somebody created, they defined a 1 of a minor opening as 11-21 3+D 4-M. That's a great shortcut for saying no four card major. Unfortunately, it's either not implemented, or implemented bug doesn't work right.

Easier syntax for automatic relay acceptance

Currently, if I want to enter a transfer auction, I must write

1N: 12-14 BAL
2D: 5+h
2H: 0+

But I really shouldn't even need to put anything after the 2H: if it is an auto-bid. Again, nothing major, just an oddity of the current parser.

Generate hands should allow for 0,1, or 2+ matches

When I define a system, I often want to roll a hand that exactly matches one of the items in the list. Alternatively, I may want to roll a hand that does NOT match anything. (i.e. it exposes a hole in the system) I also may want to see hands that have two different paths down a tree in order to better decide on how to discriminate between two completely different but

Support a way to sort match results

If I have multiple cases, and I want to see the hand patterns, sometimes I will want to see them by order of frequency. But other times, I will want to see them by the order of the bid. For example. if I put it responses to 2S, I may want to see the results as
2S-> 2N
2S-> 3C
2S-> 3D

etc, regardless of frequency.

Define templates of questions

There are multiple types of questions, and different types of questions need different types of engineering solution. We need to categorize questions and prioritize them based on engineering resources.

Specific honor constraint

Related to #24.

  • Ability to specify a suit as "sound", "light", "very light", etc.
  • Ability to handle things like the following
* 1N:
  * 3m: 6+m KQ+
* 3N: 8+m AKQ+
* 2H: 6+H sound

Support firstSuit()

Need to support something like firstSuit()

firstSuit(H) should expand to 5+H S<H H>=D H>=C

Top X of Y constraint

Per discussion with @sievers2501

Top (2,3) is KQ+
Top (3,6) would be JT9 or better
2H bust would be not(top(1,2))
(3,6) top (2,3) would be KQ9 or better

Define a mechanism for interference

At some point, we want to be to define an auction of an opening, overcall, and response. There will need to be some method of entering that information without destroying the simplicity of the current capacity to assume all quiet by the opponents.

Hand matches expected constraints, but still shows false.

For testing purposes, I set up the following simple stayman response.

1N: 0-17 BAL
2C: 9+ (4H or 4S or 5+S 4H or 4S 5+H)
2D: 5+H

The 2C should be true whenever there is 9+ HCP and either one of the 4 following conditions are true. 4 hearts, 4 spades, 5 spades and 4 hearts, or 4 spades and 5 hearts. The following hand as responder doesn't match the 2C bid, but it does the 2D bid. (The opener does, so no worries there)
AQT6.AJ862.K2.T8

Is this a bug, or am I entering the syntax wrongly?

Feature: Add syntax for "any" shape

Currently, if we would want to enter a hand that is 4441 with the singleton in any of the four suits, we would have to say shape 4441 or shape 4414 or shape 4144 or shape 1444. There should be an "any" 4441 hand. Or an "any" 4333 to denote such hands more succinctly.

Board-based par score calculation

Per @eieioAce

Per player, pre-calculate 35 contract score
If it doesn't make, add a double to it
And also add pass = 0, so each player has 36 options (to bid, or pass)
Each player sort the options based on the score, descendent
Dealer simply put the first option, which is the best contract from that direction
Next player do a linear scan to see if there's a higher bid and benefits
And so forth
So the dealer decides how you start the algorithm

Copying system definition from the Bridge App to GoogleDoc flattens bidding levels

I'm working on a system, and went to save my work over to Google docs. When I did so, all of the indentations flattened out to one level. It appear you can copy the other way just fine, from Google docs to the bridge app. But going TO google docs the tabs are not carried over.

In once since this isn't urgent, but it does slow me down until we have a better editing method.

Investigate Borel hand generator for ideas

Go to https://bridgeteaching.com/borel/ and download the .zip file and play around with the program. There may be ideas on for feature requests or interesting ways of handling hands and deals. This program is woefully out of date, and they have lost the source code, but that doesn't mean there might be a nugget in there somewhere for us to snag.

Add mechanism for passing

Allow for passing as a bid option. Either explicit or implicit. In forcing scenarios pass would be disallowed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.