All Downloads are FREE. Search and download functionalities are using the official Maven repository.

APT.all-test.dice-model-bot-new.Impasse_Tie.evaluate-operator.compute-pass-likelihood.soar Maven / Gradle / Ivy


## Only evaluate after other bids (bid with no pass, challenge)

sp {evaluate-operator*propose*compute-pass-likelihood
   (state  ^name evaluate-operator
              ^superstate.operator.superoperator.name pass)
-->
   ( ^operator  + =)
   ( ^name compute-pass-likelihood)
}

# Pushed Dice not the same
sp {apply*compute-pass-likelihood*impossible*pass
   (state  ^operator 
              ^top-state.io.input-link.players.me 
              ^superstate.operator.evaluation )
   ( ^name compute-pass-likelihood)
   ( ^pushed )
   ( ^die.face 
            ^die.face <> )
-->
   (write (crlf) |  Pass success likelihood is lose - different pushed dice|)
   ( ^symbolic-value lose)
   ( ^numeric-value 0.0)}

# Good pass - all same value
sp {apply*compute-pass-likelihood*good*pass
   (state  ^operator 
              ^top-state.io.input-link.players.me 
              ^superstate.operator.evaluation )
   ( ^name compute-pass-likelihood)
   ( ^dice-counts )
   ( ^ { <> 0  })
  -{( ^<>  <> 0)}
-->
   (write (crlf) |  Pass success likelihood is certain - all dice the same.|)
   ( ^symbolic-value certain)
   ( ^probability 1.0)}

# one pushed - one in cup
sp {apply*compute-pass-likelihood*risky*pass
   (state  ^operator 
              ^top-state.io.input-link.players.me 
              ^superstate.operator.evaluation )
   ( ^name compute-pass-likelihood)
   ( ^pushed.count 1
         ^cup.count 1)
  -( ^pushed.die 
         ^cup.die )
-->
   (write (crlf) |  Pass success likelihood is risky - one die under cup, one pushed.|)
   ( ^symbolic-value risky
        ^bid-difference -0.34)
   ( ^probability .4)}

sp {apply*compute-pass-likelihood*risky*pass2
   (state  ^operator 
              ^top-state.io.input-link.players.me 
              ^superstate.operator.evaluation )
   ( ^name compute-pass-likelihood)
   (   ^cup.count 1
           ^pushed.die.face 
          -^cup.die.face 
          -^pushed.die.face <> )
-->
   (write (crlf) |  Pass success likelihood is risky - one die under cup, one pushed.|)
   ( ^symbolic-value risky
        ^bid-difference -0.34)
   ( ^probability .4)}


# two under cup - none pushed
sp {apply*compute-pass-likelihood*risky*pass*no-push
   (state  ^operator 
              ^top-state.io.input-link.players.me 
              ^superstate.operator.evaluation )
   ( ^name compute-pass-likelihood)
   ( ^pushed.count 0
         ^cup.count 2)
  -( ^dice-counts. 2)
-->
   (write (crlf) |  Pass success likelihood is risky - two dice under cup.|)
   ( ^symbolic-value risky
        ^bid-difference -0.34)
   ( ^probability .4)}

####
sp {apply*compute-pass-likelihood*risky*pass*push*2undercup
   (state  ^operator 
              ^top-state.io.input-link.players.me 
              ^superstate.operator.evaluation )
   ( ^name compute-pass-likelihood)
   ( ^pushed.count > 0
         ^cup.count >= 2)
  -{( ^dice-counts )
    ( ^ { <> 0  })
   -{( ^<>  <> 0)}}
-->
   (write (crlf) |  Pass success likelihood is risky - two or more dice under cup.|)
   ( ^symbolic-value very-risky
        ^bid-difference -4.0)
   ( ^probability .08)}

## three under cup
sp {apply*compute-pass-likelihood*impossible*pass*very-risky
   (state  ^operator 
              ^top-state.io.input-link.players.me 
              ^superstate.operator.evaluation )
   ( ^name compute-pass-likelihood)
   ( ^pushed.count 0
         ^cup.count {  >= 3 })
  -( ^dice-counts. )
-->
   (write (crlf) |  Pass success likelihood is very risky - three dice under cup.|)
   ( ^symbolic-value very-risky
        ^bid-difference -4.3)
   ( ^probability .08)}