I have written the logic statements behind 3 different versions of a simple finite state machine for Straw. These are very primitive AI experts, and ultimately fail to capture a number of considerations that ordinary people make throughout the course of playing Straw. But, it represents my first attempt to analyze the AI heuristic for Straw Online. If you would like me to look at your own (more complex) decision matrix, please post it in the comments. If yours looks good, then you might just be immortalized in Straw Online (as one of the resident personalities).
Definition Section:
HC = a card in hand
NC = a normal card (any card whose value = 1 thru 10)
SC = a special card (any other card)
E = set of cards in hand eligible to be played
Y = current total value of cards in hand
X = current total weight on camel
X’ = total weight on camel after playing a card
Basic Game Play Section:
(1) Always include straw card in E
(2) If HC -> X’ > 50, exclude it from E
(3) If HC -> X’ < 0, exclude it from E
(4) If X = 0, exclude Copy from E
(5) If E is empty, play any HC
(6) If there is only 1 card in E, play it
Expert’s Strategy Section (instructions for deciding between 2 or more
eligible cards in hand):
Safety Card Strategy
(1) If X = 50 & Y > 0, play straw card
(2) If 0 SC in E, play 2nd lowest NC
(3) If 1 SC in E, play lowest NC
(4) If 2 or more SC in E, play a SC as follows:
(5) If 2 or more negative cards in E, play the lowest negative
(6) If negative card in E < -5, play it
(7) If copy card in E, play it
(8) If magic lamp in E, play it with the following value:
(9) If X = 49, value = 1
(10) If X < 40, value = 10
(11) If X > 39, value = ? so that X’ = 49
(12) If negative card in E, play it
(13) If reverse card in E, play it
Super Safe Strategy
(1) If X = 50 & Y > 0, play straw card
(2) If 2 or less SC in E, play highest NC
(3) If 3 or more SC in E, play a SC as follows:
(4) If 2 or more negative cards in E, play the lowest negative
(5) If copy card in E, play it
(6) If magic lamp in E, play it with value = 1
(7) If negative card in E, play it
(8) If reverse card in E, play it
Super Aggressive Strategy
(1) If X = 50 & Y > 0, play straw card
(2) If negative card in E, play the lowest
(3) If copy card in E, play it
(4) If magic lamp in E, play it with the following value:
(5) If X < 41, lamp value = 10
(6) If x > 40, lamp value = ? so that X’ = 50
(7) If reverse card in E, play it
(8) Play lowest NC in E







