Shanky Technologies Poker Bot Support Forum

General Category => PPL Support => Topic started by: tapthatace on May 16, 2021, 08:29:25 PM



Title: Fresh Set of Eye's Please
Post by: tapthatace on May 16, 2021, 08:29:25 PM
I am trying to figure out why the following line of code ran for this turn card?  Hero's hand is Qd 7s Kd As
This rand when this was the Turn (Do I have my parenthesis in wrong spots or is the Not reading correctly?)
http://prntscr.com/130b1zi (http://prntscr.com/130b1zi)


Here is my code:
When NoBettingOnFlop and (HaveTwoPair and Not(HaveTopTwoPair and HaveBottomTwoPair)) and Not(PairOnBoard and StraightPossible and FlushPossible)



Title: Re: Fresh Set of Eye's Please
Post by: Egor on May 17, 2021, 02:42:11 AM
HaveTwoPair and Not (HaveTopTwoPair and HaveBottomTwoPair)


...is this even possible?

in any case you don't hold T7 so HaveBottomTwoPair is not true, and to be frank I didn't even know that variable existed.

Which part of the codeline are you thinking should not be true? It looks true to me.


Title: Re: Fresh Set of Eye's Please
Post by: ykcip75 on May 17, 2021, 10:34:37 AM
I am trying to figure out why the following line of code ran for this turn card?  Hero's hand is Qd 7s Kd As
This rand when this was the Turn (Do I have my parenthesis in wrong spots or is the Not reading correctly?)
http://prntscr.com/130b1zi (http://prntscr.com/130b1zi)


Here is my code:
When NoBettingOnFlop and (HaveTwoPair and Not(HaveTopTwoPair and HaveBottomTwoPair)) and Not(PairOnBoard and StraightPossible and FlushPossible)



This line should have written like this :

when NoBettingOnFlop and HaveTwoPair and Not (HaveTopTwoPair or HaveBottomTwoPair or PairOnBoard or StraightPossible or FlushPossible)

It makes more sense to me...

In general don't use Not (X and Y) because it means not X or not Y...
So if one the condition is true the line... will be executed.

But Not (X or Y) means not X and not Y so all the nots has to be true for the condition to be executed...



Title: Re: Fresh Set of Eye's Please
Post by: tapthatace on May 17, 2021, 02:14:29 PM
HaveTwoPair and Not (HaveTopTwoPair and HaveBottomTwoPair)


...is this even possible?

in any case you don't hold T7 so HaveBottomTwoPair is not true, and to be frank I didn't even know that variable existed.

Which part of the codeline are you thinking should not be true? It looks true to me.


Using the HaveTwoPair and Not(HaveTopTwoPair and HaveBottomeTwoPair) is my way of saying you have Middle two pair

The part of the code line that was true was PairOnBoard so assuming the Not(.....) it wouldn't have ran


Title: Re: Fresh Set of Eye's Please
Post by: tapthatace on May 17, 2021, 02:18:08 PM
This line should have written like this :

when NoBettingOnFlop and HaveTwoPair and Not (HaveTopTwoPair or HaveBottomTwoPair or PairOnBoard or StraightPossible or FlushPossible)

It makes more sense to me...

In general don't use Not (X and Y) because it means not X or not Y...
So if one the condition is true the line... will be executed.

But Not (X or Y) means not X and not Y so all the nots has to be true for the condition to be executed...


hmmm this is confusing the heck out of me -- so And within the NOT statement acts like an or and opposite?  I am looking for all of those conditions within the NOT to be false


Title: Re: Fresh Set of Eye's Please
Post by: ykcip75 on May 17, 2021, 04:03:39 PM

Using the HaveTwoPair and Not(HaveTopTwoPair and HaveBottomeTwoPair) is my way of saying you have Middle two pair

The part of the code line that was true was PairOnBoard so assuming the Not(.....) it wouldn't have ran

This is the Demorgan Rule :

not (A and B) = not A or not B

not (A or B) = not A and not B

If you write when HaveTwoPair and Not(HaveTopTwoPair and HaveBottomTwoPair)

it can be rewritten to when HaveTwoPair and Not HaveTopTwoPair or Not HaveBottomTwoPair

So this line is a disaster because it will be executed even if you have nothing because of the "or Not HaveBottomTwoPair"

To write the line correctly if you have 2 options :

1) when HaveTwoPair and not HaveTopTwoPair and not HaveBottomTwoPair

2) when HaveTwoPair and not (HaveTopTwoPair or HaveBottomTwoPair)


Don't worry you will get it...But if it's too difficult or too confusing...

My simple advice is never use not (A and B) and never use not A or not B....

Only use

not (A or B) and not A and not B



Title: Re: Fresh Set of Eye's Please
Post by: tapthatace on May 17, 2021, 05:21:14 PM
Thanks a million -- I never heard of Demorgans law (or I don't remember it from Stats and my development classes since those were over 25 years ago)

(https://blog.penjee.com/wp-content/uploads/2016/12/demorgans-law-formula_all.png)