
APT.all-test.dice-model-bot-new.Impasse_Tie.evaluate-operator.compute-bid-probability.soar Maven / Gradle / Ivy
sp {evaluate-operator*propose*compute-bid-probability*first-bid*undercup*same-count
(state ^name evaluate-operator
^top-state.last-bid
^superstate.operator
^top-state )
( ^probabilities true
^io.input-link.state.last-bid nil
^io.input-link.players.me.cup. > 0)
( ^evaluation
^superoperator )
( ^name bid
-^push-face
^multiplier
^face )
( ^count )
-->
( ^probability 0.7)
}
sp {evaluate-operator*propose*compute-bid-probability*first-bid*undercup*higher-count
(state ^name evaluate-operator
^top-state.last-bid
^superstate.operator
^top-state )
( ^probabilities true
^io.input-link.state.last-bid nil
^io.input-link.players.me.cup. > 0)
( ^evaluation
^superoperator )
( ^name bid
-^push-face
^multiplier >
^face )
( ^count )
-->
( ^probability 0.65)
}
sp {evaluate-operator*propose*compute-bid-probability*first-bid*undercup*1
(state ^name evaluate-operator
^superstate.operator
^top-state )
( ^probabilities true
^io.input-link.state.last-bid nil
^io.input-link.players.me.cup )
( ^1 > 0)
( ^evaluation
^superoperator )
( ^name bid
-^push-face
^face 1)
-->
( ^probability 0.7)
}
sp {evaluate-operator*propose*compute-bid-probability*first-bid*not-undercup
(state ^name evaluate-operator
^superstate.operator
^top-state )
( ^probabilities true
^io.input-link.state.last-bid nil
-^io.input-link.players.me.cup. > 0)
( ^evaluation
^superoperator )
( ^name bid
-^push-face
^face )
-->
( ^probability 0.6)
}
# Give six and five bids a little boost
sp {evaluate-operator*propose*compute-bid-probability*first-bid*6
(state ^name evaluate-operator
^superstate.operator
^top-state )
( ^probabilities true
^io.input-link.state.last-bid nil)
( ^evaluation
^superoperator )
( ^name bid
-^push-face
^face << 5 6 >>)
-->
( ^probability 0.1)
}
###The following for non-first bid
sp {evaluate-operator*propose*compute-bid-probability
(state ^name evaluate-operator
^top-state.probabilities true
-^top-state.io.input-link.state.last-bid nil
^superstate.operator.superoperator )
( ^name bid
-^push-face
^face
^multiplier )
-->
( ^operator + =)
( ^name compute-bid-probability
^face
^multiplier )
}
#### Real bid applications
### No specials from model
## 1 bid
sp {apply*compute-bid-probability*1*bid
(state ^operator
^superstate.operator.evaluation
^top-state.io.output-link
^dice-counts.dice-count
-^dice-counts.dice-count.face special)
( ^name compute-bid-probability
^face 1
^multiplier )
( ^face 1
^count )
( ^face unknown
^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-probability*special-rules*bid
(state ^operator
^superstate.operator.evaluation
^top-state.io
^dice-counts.dice-count
-^dice-counts.dice-count.face special)
( ^name compute-bid-probability
^face { <> 1 }
^multiplier )
( ^input-link.state.special true
^output-link )
( ^face
^count )
( ^face unknown
^count )
-->
(write (crlf) | Bid: | | | |'s. Estimated total: | (+ (/ 6) ) | Bid Difference: | (- (+ (/ 6) ) ) | special rules|)
( ^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-probability*not-special-rules*bid
(state ^operator
^superstate.operator.evaluation
^top-state
^dice-counts.dice-count
-^dice-counts.dice-count.face special)
( ^name compute-bid-probability
^face { <> 1 }
^multiplier )
( ^io.input-link.state.special false
^io.output-link )
( ^face
^count )
( ^face 1
^count )
( ^face unknown
^count )
-->
(write (crlf) | Bid: | | | |'s. Estimated total: | (+ (/ 3) ) | Bid Difference: | (- (+ (/ 3) ) ) | normal rules|)
( ^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)
}
##################SPECIALS FROM MODEL
## 1 bid
sp {apply*compute-bid-probability*1*bid*model-special*not-face1
(state ^operator
^superstate.operator.evaluation
^top-state.io.output-link
^dice-counts.dice-count )
( ^name compute-bid-probability
^face 1
^multiplier )
( ^face 1
^count )
( ^face unknown
^count )
( ^face special
^not-face 1)
-->
(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-probability*1*bid*model-special*not-face-not-1
(state ^operator
^superstate.operator.evaluation
^top-state.io.output-link
^dice-counts.dice-count )
( ^name compute-bid-probability
^face 1
^multiplier )
( ^face 1
^count )
( ^face unknown
^count )
( ^face special
^not-face <> 1
^count )
-->
(write (crlf) | Bid: | | 1's. Estimated total: |
(+ (/ (+ ) 6) ) | Bid Difference: |
(- (+ (/ (+ ) 6) ) ))
(