I've been sketching out card-playing code... gin/rummy... any thoughts
on the most effective weighting system for scenarios such as having
2Clubs, 2Hearts, 5Diamonds, 6Clubs, 8Diamonds, 10Hearts, QHearts &
'drawing' say a 6Spades...
I'll be using a 'slightly unreliable' memory of previously played
cards, but let's assume that the game has just begun...
I know there is a judgment call here & it looks like either the
5Diamonds or 8Diamonds is 'gone'...
But how to systemize the weighting of it?
If the hand was: 2Clubs, 2Hearts, 5Diamonds, 6Clubs,
****7Diamonds****, 10Hearts, QHearts, 'drawing' a 6Spades,
how would the benefit/loss of keeping the 6Spades & discarding the
5Diamonds/7Diamonds/whatever-other-card change?
Anyone know of a paper/chapter on such a 'marking scheme'?
Regards,
K
antiparanoid.blogspot.com
On Mar 31, 11:39 pm, KevinZzz <···············@gmail.com> wrote:
> I've been sketching out card-playing code... gin/rummy... any thoughts
> on the most effective weighting system for scenarios such as having
> 2Clubs, 2Hearts, 5Diamonds, 6Clubs, 8Diamonds, 10Hearts, QHearts &
> 'drawing' say a 6Spades...
>
> I'll be using a 'slightly unreliable' memory of previously played
> cards, but let's assume that the game has just begun...
>
> I know there is a judgment call here & it looks like either the
> 5Diamonds or 8Diamonds is 'gone'...
>
> But how to systemize the weighting of it?
>
> If the hand was: 2Clubs, 2Hearts, 5Diamonds, 6Clubs,
> ****7Diamonds****, 10Hearts, QHearts, 'drawing' a 6Spades,
> how would the benefit/loss of keeping the 6Spades & discarding the
> 5Diamonds/7Diamonds/whatever-other-card change?
>
> Anyone know of a paper/chapter on such a 'marking scheme'?
This is ultimately a simple* combinatorics problem. Just figure out,
given your current hand and the memory of previous cards, what the
chances are of you getting each of the scoring hands, weighted by the
value of those hands. Then you can just sum them up for a hand value.
* for peculiar definitions of 'simple'
~TJ
TJ Atkins wrote:
> On Mar 31, 11:39 pm, KevinZzz <···············@gmail.com> wrote:
>> I've been sketching out card-playing code... gin/rummy... any thoughts
>> on the most effective weighting system for scenarios such as having
>> 2Clubs, 2Hearts, 5Diamonds, 6Clubs, 8Diamonds, 10Hearts, QHearts &
>> 'drawing' say a 6Spades...
>>
>> I'll be using a 'slightly unreliable' memory of previously played
>> cards, but let's assume that the game has just begun...
>>
>> I know there is a judgment call here & it looks like either the
>> 5Diamonds or 8Diamonds is 'gone'...
>>
>> But how to systemize the weighting of it?
>>
>> If the hand was: 2Clubs, 2Hearts, 5Diamonds, 6Clubs,
>> ****7Diamonds****, 10Hearts, QHearts, 'drawing' a 6Spades,
>> how would the benefit/loss of keeping the 6Spades & discarding the
>> 5Diamonds/7Diamonds/whatever-other-card change?
>>
>> Anyone know of a paper/chapter on such a 'marking scheme'?
>
> This is ultimately a simple* combinatorics problem. Just figure out,
> given your current hand and the memory of previous cards, what the
> chances are of you getting each of the scoring hands, weighted by the
> value of those hands. Then you can just sum them up for a hand value.
>
> * for peculiar definitions of 'simple'
Yeah, you have to think about the greater risk in holding onto unmelded
high cards, you have allow for what your opponent has kept and discarded
to project the contents of their hand,...
kt
> TJ Atkins wrote:
>> On Mar 31, 11:39 pm, KevinZzz <···············@gmail.com> wrote:
>>> I've been sketching out card-playing code... gin/rummy... any thoughts
>>> on the most effective weighting system for scenarios such as having
>>> 2Clubs, 2Hearts, 5Diamonds, 6Clubs, 8Diamonds, 10Hearts, QHearts &
>>> 'drawing' say a 6Spades...
>>>
>>> I'll be using a 'slightly unreliable' memory of previously played
>>> cards, but let's assume that the game has just begun...
When I played cutthroat hearts, the feedback had me easily tracking
the card deck down to the 3s. I would expect the same out of any good
card player.
>>> I know there is a judgment call here & it looks like either the
>>> 5Diamonds or 8Diamonds is 'gone'...
>>>
>>> But how to systemize the weighting of it?
Ready Fire Aim
Assign some weights, run a few thousand hands against them, adjust on
the fly. You need some notion of 'better play' in order to set
weights, sending feedback into the current weights. Darse Billings
just had one generation of his poker code play the next generation in
order to resolve such questions, seems like a better answer than
self-play.
--
Latin is dead. Latin googles 352,000,000, Lisp googles 8,640,000.
Therefore, Lisp isn't as dead as Latin.
On Apr 1, 5:39 am, KevinZzz <···············@gmail.com> wrote:
> I've been sketching out card-playing code... gin/rummy... any thoughts
> on the most effective weighting system for scenarios such as having
> 2Clubs, 2Hearts, 5Diamonds, 6Clubs, 8Diamonds, 10Hearts, QHearts &
> 'drawing' say a 6Spades...
>
> I'll be using a 'slightly unreliable' memory of previously played
> cards, but let's assume that the game has just begun...
>
> I know there is a judgment call here & it looks like either the
> 5Diamonds or 8Diamonds is 'gone'...
>
> But how to systemize the weighting of it?
>
> If the hand was: 2Clubs, 2Hearts, 5Diamonds, 6Clubs,
> ****7Diamonds****, 10Hearts, QHearts, 'drawing' a 6Spades,
> how would the benefit/loss of keeping the 6Spades & discarding the
> 5Diamonds/7Diamonds/whatever-other-card change?
>
> Anyone know of a paper/chapter on such a 'marking scheme'?
>
> Regards,
>
> K
>
> antiparanoid.blogspot.com
Thanks guys
KT's point most interesting..
K
KevinZzz <···············@gmail.com> writes:
> On Apr 1, 5:39 am, KevinZzz <···············@gmail.com> wrote:
>> I've been sketching out card-playing code... gin/rummy... any thoughts
>> on the most effective weighting system for scenarios such as having
>> 2Clubs, 2Hearts, 5Diamonds, 6Clubs, 8Diamonds, 10Hearts, QHearts &
>> 'drawing' say a 6Spades...
>>
>> I'll be using a 'slightly unreliable' memory of previously played
>> cards, but let's assume that the game has just begun...
This is what bothered me with your question. If you forget what
cards have been played, you may still by chance select the best move.
Sussman attains enlightment:
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
"What are you doing?", asked Minsky.
"I am training a randomly wired neural net to play Tic-Tac-Toe.", Sussman replied.
"Why is the net wired randomly?", asked Minsky.
"I do not want it to have any preconceptions of how to play", Sussman said.
Minsky shut his eyes.
"Why do you close your eyes?", Sussman asked his teacher.
"So that the room will be empty."
At that moment, Sussman was enlightened.
http://www.c2i.ntu.edu.sg/AI+CI/Humor/AI_Jokes/AIKoans-DHillis.html
Forget about forgetting. Play the best you can. If you want to let
the human player win, then you will be able to choose a weaker move by
just avoiding the best(s) move(s).
--
__Pascal Bourguignon__