Re: Search for an algorithm to deal cards with preset conditions



On Mon, 31 Mar 2008 14:05:43 +0200, Volker Lenhardt wrote:

Sorry for the delay, Stan.

stan schrieb:

Can you post a specfic example?

I don't know: an example of what?


I think he meant an example of the (kind of) restrictions you want o
impose on the dealing. e.g:
{
North has 6 spades, but the highest one is a Jack.
East has 4 spades, including KQ
South has 4 aces and 4 tens,
....
}



State the constraints;
List a valid example of the deal;

I'm still not convinced the specificataion is complete and clear enough
to start coding yet.

There are to be dialogs to choose presets for all 4 hands, explicit
(e.g. strong opening hand, AQ of hearts) or combined (e.g. slam, major
suit fit). Here there will be procedures to validate the input. The
values have to be sound.

Here you make the mistake of assuming domain-knowledge.
Most people here know the playing cards, few of them know bridge, or
bidding. I don't, for instance. Your qualification "strong hand" means
nothing to me, for instance.

Next step: specify suit lengths and point counts out of these presets as
rules for the deal:
minLength[hand][suit]
maxLength[hand][suit]
minStrength[hand][suit]
maxStrength[hand][suit]

This means that there has to be some sort of preselection. I don't know

I am sorry; you are diving into implementation details here.
Too soon, IMHO ... First state the rules, please.

I know I'll need patience and a lot of time - and sometimes the help of
experienced programmers.
Regards
Volker

You're welcome,
AvK

.



Relevant Pages

  • Re: Search for an algorithm to deal cards with preset conditions
    ... moi wrote: ... North has 6 spades, but the highest one is a Jack. ... I'm still not convinced the specificataion is complete and clear enough ...
    (comp.programming)
  • Re: One from a book
    ... partner can't count aces or spades. ... from a six-bagger) and LHO is likely to have three spades. ... discard, he's probably 3424 and we should play him for the spade queen. ...
    (rec.games.bridge)
  • Re: One from a book
    ... partner can't count aces or spades. ... If spades are 2-2 or a stiff queen drops ... S Qxx or S Qxxx. ...
    (rec.games.bridge)
  • Re: Weak two bid
    ... I did and LHO bid 2 Spades and  RHO raised to 4 Spades ... I did not wish to give a winner to a low Heart. ... it is uncommon for a hand with 2 aces and a 6-card suit not to ...
    (rec.games.bridge)
  • Re: Double again
    ... In fact, lacking so many aces ... whatever partner has in spades, and no decent suit of my own to offer. ... You have a maximum in hcp which are useful for either defense or ...
    (rec.games.bridge)