
APT.all-test.dice-model-bot-new.Impasse_Tie.evaluate-operator.compute-bid-push-probability.soar Maven / Gradle / Ivy
## Could combine with compute-bid-difference if that used new unknown computation.
## Only consider pushing after first bid
sp {evaluate-operator*propose*compute-bid-push-probability
(state ^name evaluate-operator
-^top-state.io.input-link.state.last-bid nil
^top-state.probabilities true
^superstate.operator.superoperator )
( ^name bid
^push-face-count
^face
^multiplier )
-->
( ^operator + =)
( ^name compute-bid-push-probability
^face
^multiplier )
}
#### MUST COUNT NUMBER OF DICE/FACE and use that for below.
## Add in dice that are rerolled into the unknown for used in computing bid difference
sp {evaluate-operator*elaborate*compute-bid-push-probability*1*push*unknown
(state ^name evaluate-operator
^operator +
^dice-counts.dice-count
^top-state.io.input-link.players.me.cup
^superstate.operator.superoperator )
( ^count
^ { < })
( ^name << compute-bid-push-difference compute-bid-push-probability >>)
( ^name bid
^push-face-count 1
^push-face )
( ^face unknown
^count )
-->
(write (crlf) |Unknowns because of single push (| |) = | (+ (- )))
(write (crlf) | Original unknowns: | | + undercup | | - push-count | )
( ^unknown (+ (- )))
}
sp {evaluate-operator*elaborate*compute-bid-push-probability*1*push*unknown*allsame
(state ^name evaluate-operator
^operator +
^dice-counts.dice-count
^top-state.io.input-link.players.me.cup
^superstate.operator.superoperator )
( ^count
^ ) # Everything undercup is
( ^name << compute-bid-push-difference compute-bid-push-probability >>)
( ^name bid
^push-face-count 1
^push-face )
( ^face unknown
^count )
-->
(write (crlf) |Unknowns because of single push (| |) = | (+ 1))
(write (crlf) | Original unknowns: | )
( ^unknown (+ 1))
}
## When pushing 1's and another face
sp {evaluate-operator*elaborate*compute-bid-push-probability*2*push*unknown
(state ^name evaluate-operator
^operator +
^dice-counts.dice-count
^top-state.io.output-link
^top-state.io.input-link.players.me.cup
^superstate.operator.superoperator )
( ^count
^
^1 )
( ^name << compute-bid-push-difference compute-bid-push-probability >>)
( ^name bid
^push-face-count 2
^push-face { <> 1 }
^push-face 1)
( ^face unknown
^count )
-->
(write (crlf) |Unknowns because of double push (| |, 1) = | (+ (- (+ ))))
(write (crlf) | Original unknowns: | | + undercup | | - push-count(face) | | - push-count(1) | )
( ^unknown (+ (- (+ ))))
}
##########
##################################
sp {apply*compute-bid-push-probability*1*bid*no-holds
(state ^operator
^superstate.operator.evaluation
^top-state.io.output-link
^dice-counts.dice-count
-^dice-counts.dice-count.hold-face <> 1)
( ^name compute-bid-push-probability
^face 1
^multiplier
^unknown )
( ^face 1
^count )
-->
(write (crlf) | Bid: | | 1's. Estimated total: | (+ (/ 6) ) | Bid Difference: | (- (+ (/ 6) ) ))
( ^total-known (- )
^total-possible (- (+ ) ))
( ^qna-query )
( ^qna-query )
( ^query compute-probability
^source dice
^results all
^parameters )
( ^count (- )
^number-of-dice
^number-of-faces 6
^predicate ge)
}
sp {apply*compute-bid-push-probability*1*bid*holds
(state ^operator
^superstate.operator.evaluation
^top-state.io.output-link
^dice-counts.dice-count )
( ^name compute-bid-push-probability
^face 1
^multiplier
^unknown )
( ^face 1
^count )
( ^hold-face <> 1
^count )
-->
(write (crlf) | Bid: | | 1's. Hold Count: | )
(write (crlf) | Estimated total: | (+ (/ (+ ) 6) ))
(write (crlf) | Bid Difference: | (- (+ (/ (+ ) 6) ) ))
( ^total-known (- )
^total-possible (- (+ ) ))
( ^qna-query )
( ^qna-query )
( ^query compute-probability
^source dice
^results all
^parameters )
( ^count (- )
^number-of-dice (+ )
^number-of-faces 6
^predicate ge)
}
sp {apply*compute-bid-push-probability*special-rules*bid
(state ^operator
^superstate.operator.evaluation
^top-state
^dice-counts.dice-count )
( ^name compute-bid-push-probability
^face { <> 1 }
^multiplier
^unknown )
( ^io.input-link.state.special true
^io.output-link )
( ^face
^count )
-->
(write (crlf) | Bid: | | | |'s. Estimated total: | (+ (/ 6) ) | Bid Difference: | (- (+ (/ 6) ) ) | special rules|)
(write (crlf) | Unknowns: | | Showing: | )
( ^total-known (- )
^total-possible (- (+ ) ))
( ^qna-query )
( ^qna-query )
( ^query compute-probability
^source dice
^results all
^parameters )
( ^count (- )
^number-of-dice
^number-of-faces 6
^predicate ge)
}
sp {apply*compute-bid-push-probability*not-special-rules*bid
(state ^operator
^superstate.operator.evaluation
^dice-counts.dice-count
^top-state )
( ^name compute-bid-push-probability
^face { <> 1 }
^multiplier
^unknown )
( ^io.input-link.state.special false
^io.output-link )
( ^face
^count )
( ^face 1
^count )
-->
(write (crlf) | Bid: | | | |'s. Estimated total: | (+ (/ 3) ) | Bid Difference: | (- (+ (/ 3) ) ) | normal rules|)
(write (crlf) | Unknowns: | | Showing: | )
( ^total-known (- (+ ) )
^total-possible (- (+ ) ))
( ^qna-query )
( ^qna-query )
( ^query compute-probability
^source dice
^results all
^parameters )
( ^count (- (+ ))
^number-of-dice
^number-of-faces 3
^predicate ge)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy