# \[QUIZ\] Paper Rock Scissors (#16)

**URL:** <https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932>\
**Category:** ruby-talk\
**Created:** [21 January 2005 14:19 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932 "2005-01-21T14:19:28Z")\
**Posts on this page:** 10\
**Page:** 2

<div class="post-metadata">

**Author:** ![Benedikt\_Huber2](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@Benedikt\_Huber2](https://rubytalk.org/u/Benedikt_Huber2)\
**Post date:** [23 January 2005 20:15 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932/21 "2005-01-23T20:15:52Z")

</div>

This is impossible for players which do not cheat.  
You can't give any predictions on the next move of a random player.  
Therefore you have a 1/3 prop. to choose a winning,losing or drawing move.

Here is another 'cheater' (which does not redefine a method):

SYMBOLS = [ :rock,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:paper,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:scissors ]  
KILLER = { :rock =\> :paper, :paper =\> :scissors, :scissors =\> :rock }

class BHCheatPlayer \< Player

&nbsp;&nbsp;def initialize( opponent )  
&nbsp;&nbsp;&nbsp;&nbsp;super  
&nbsp;&nbsp;&nbsp;&nbsp;@opp = Object.const\_get(opponent).new(self)  
&nbsp;&nbsp;end

&nbsp;&nbsp;def choose  
&nbsp;&nbsp;&nbsp;&nbsp;KILLER[@opp.choose]  
&nbsp;&nbsp;end

&nbsp;&nbsp;def result(you,them,result)  
&nbsp;&nbsp;&nbsp;&nbsp;@opp.result(them,you,result)  
&nbsp;&nbsp;end

end

> **···**
>
> On Mon, 24 Jan 2005 01:46:58 +0900, James Edward Gray II wrote:
> 
> > On Jan 23, 2005, at 5:40 AM, Benedikt Huber wrote:
> > 
> > > Otherwise, a strategy simply selecting a random choice will always  
> > > have a  
> > > 50% chance of winning
> > 
> > Looks like we are seeing some strategies that do better than 50%  
> > against a random player. 😉

---

<div class="post-metadata">

**Author:** ![Benedikt\_Huber2](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@Benedikt\_Huber2](https://rubytalk.org/u/Benedikt_Huber2)\
**Post date:** [23 January 2005 20:15 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932/22 "2005-01-23T20:15:53Z")

</div>

I have a similar solution:

SYMBOLS = [ :rock,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:paper,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:scissors ]  
KILLER = { :rock =\> :paper, :paper =\> :scissors, :scissors =\> :rock }  
MAXSIZE = 5

class Symbol  
&nbsp;&nbsp;def +(o)  
&nbsp;&nbsp;&nbsp;&nbsp;return (self.to\_s+o.to\_s).to\_sym  
&nbsp;&nbsp;end  
end

class BHAdaptPlayer4 \< Player

&nbsp;&nbsp;def initialize( opponent )  
&nbsp;&nbsp;&nbsp;&nbsp;@stats = Hash.new()  
&nbsp;&nbsp;&nbsp;&nbsp;@lastmoves = []  
&nbsp;&nbsp;end

&nbsp;&nbsp;def get\_keys  
&nbsp;&nbsp;&nbsp;&nbsp;keys = []  
&nbsp;&nbsp;&nbsp;&nbsp;@lastmoves.each do |pair|  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keys.unshift( keys.empty? ? pair : (keys[0]+pair))  
&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;&nbsp;keys  
&nbsp;&nbsp;end

&nbsp;&nbsp;def choose  
&nbsp;&nbsp;&nbsp;&nbsp;info = nil  
&nbsp;&nbsp;&nbsp;&nbsp;get\_keys.each do |key|  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;info = @stats[key]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break if info  
&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;&nbsp;if ! info  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SYMBOLS[rand(3)]  
&nbsp;&nbsp;&nbsp;&nbsp;else  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max = -1  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msym = nil  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;info.keys.each do |sym|  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msym,max = sym,info[sym] if(info[sym] \> max)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;KILLER[msym]  
&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;end

&nbsp;&nbsp;# called after each choice you make to give feedback  
&nbsp;&nbsp;# you = your choice  
&nbsp;&nbsp;# them = opponent's choice  
&nbsp;&nbsp;# win\_lose\_or\_draw = :win, :lose or :draw, your result  
&nbsp;&nbsp;def result( you, them, win\_lose\_or\_draw )  
&nbsp;&nbsp;&nbsp;&nbsp;get\_keys.each do |key|  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@stats[key] = create\_stat if ! @stats[key]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@stats[key][them] += 1  
&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;&nbsp;@lastmoves.unshift(@lastchoice)  
&nbsp;&nbsp;&nbsp;&nbsp;@lastmoves.pop if @lastmoves.size \> MAXSIZE

&nbsp;&nbsp;&nbsp;&nbsp;@lastchoice = them+you  
&nbsp;&nbsp;end

&nbsp;&nbsp;def create\_stat  
&nbsp;&nbsp;&nbsp;&nbsp;stat = {}  
&nbsp;&nbsp;&nbsp;&nbsp;SYMBOLS.each {|sym| stat[sym] = 0 }  
&nbsp;&nbsp;&nbsp;&nbsp;stat  
&nbsp;&nbsp;end

end

---

<div class="post-metadata">

**Author:** ![Simon\_Strandgaard2](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@Simon\_Strandgaard2](https://rubytalk.org/u/Simon_Strandgaard2)\
**Post date:** [23 January 2005 13:32 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932/23 "2005-01-23T13:32:34Z")

</div>

In the bottom of this mail are my 7 bots.

2 of them ne\_cont\_rand.rb and ne\_cont\_queue.rb uses continuations,  
so its probably best to discard them.

> **···**
>
> --  
> Simon Strandgaard
> 
> #!/bin/sh  
> # This is a shell archive (produced by GNU sharutils 4.2.1).  
> # To extract the files from this archive, save it to some FILE, remove  
> # everything before the `!/bin/sh' line above, then type `sh FILE'.  
> #  
> # Made on 2005-01-23 15:41 CET by \<neoneye@server\>.  
> # Source directory was `/home/neoneye/code/quiz/rock\_scissor\_paper'.  
> #  
> # Existing files will \*not\* be overwritten unless `-c' is specified.  
> #  
> # This shar contains:  
> # length mode name  
> # ------ ---------- ------------------------------------------  
> # 555 -rw-r--r-- players/ne\_queue.rb  
> # 707 -rw-r--r-- players/ne\_rand.rb  
> # 1786 -rw-r--r-- players/ne\_antibias.rb  
> # 1397 -rw-r--r-- players/ne\_treshold.rb  
> # 1642 -rw-r--r-- players/ne\_stupid.rb  
> # 400 -rw-r--r-- players/ne\_cont\_queue.rb  
> # 303 -rw-r--r-- players/ne\_cont\_rand.rb  
> #  
> save\_IFS="${IFS}"  
> IFS="${IFS}:"  
> gettext\_dir=FAILED  
> locale\_dir=FAILED  
> first\_param="$1"  
> for dir in $PATH  
> do  
> &nbsp;&nbsp;if test "$gettext\_dir" = FAILED && test -f $dir/gettext \  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&& ($dir/gettext --version \>/dev/null 2\>&1)  
> &nbsp;&nbsp;then  
> &nbsp;&nbsp;&nbsp;&nbsp;set `$dir/gettext --version 2\>&1`  
> &nbsp;&nbsp;&nbsp;&nbsp;if test "$3" = GNU  
> &nbsp;&nbsp;&nbsp;&nbsp;then  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gettext\_dir=$dir  
> &nbsp;&nbsp;&nbsp;&nbsp;fi  
> &nbsp;&nbsp;fi  
> &nbsp;&nbsp;if test "$locale\_dir" = FAILED && test -f $dir/shar \  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&& ($dir/shar --print-text-domain-dir \>/dev/null 2\>&1)  
> &nbsp;&nbsp;then  
> &nbsp;&nbsp;&nbsp;&nbsp;locale\_dir=`$dir/shar --print-text-domain-dir`  
> &nbsp;&nbsp;fi  
> done  
> IFS="$save\_IFS"  
> if test "$locale\_dir" = FAILED || test "$gettext\_dir" = FAILED  
> then  
> &nbsp;&nbsp;echo=echo  
> else  
> &nbsp;&nbsp;TEXTDOMAINDIR=$locale\_dir  
> &nbsp;&nbsp;export TEXTDOMAINDIR  
> &nbsp;&nbsp;TEXTDOMAIN=sharutils  
> &nbsp;&nbsp;export TEXTDOMAIN  
> &nbsp;&nbsp;echo="$gettext\_dir/gettext -s"  
> fi  
> if touch -am -t 200112312359.59 $$.touch \>/dev/null 2\>&1 && test ! -f  
> 200112312359.59 -a -f $$.touch; then  
> &nbsp;&nbsp;shar\_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'  
> elif touch -am 123123592001.59 $$.touch \>/dev/null 2\>&1 && test ! -f  
> 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then  
> &nbsp;&nbsp;shar\_touch='touch -am $3$4$5$6$1$2.$7 "$8"'  
> elif touch -am 1231235901 $$.touch \>/dev/null 2\>&1 && test ! -f  
> 1231235901 -a -f $$.touch; then  
> &nbsp;&nbsp;shar\_touch='touch -am $3$4$5$6$2 "$8"'  
> else  
> &nbsp;&nbsp;shar\_touch=:  
> &nbsp;&nbsp;echo  
> &nbsp;&nbsp;$echo 'WARNING: not restoring timestamps. Consider getting and'  
> &nbsp;&nbsp;$echo "installing GNU \`touch', distributed in GNU File Utilities..."  
> &nbsp;&nbsp;echo  
> fi  
> rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch  
> #  
> if mkdir \_sh06382; then  
> &nbsp;&nbsp;$echo 'x -' 'creating lock directory'  
> else  
> &nbsp;&nbsp;$echo 'failed to create lock directory'  
> &nbsp;&nbsp;exit 1  
> fi  
> # ============= players/ne\_queue.rb ==============  
> if test ! -d 'players'; then  
> &nbsp;&nbsp;$echo 'x -' 'creating directory' 'players'  
> &nbsp;&nbsp;mkdir 'players'  
> fi  
> if test -f 'players/ne\_queue.rb' && test "$first\_param" != -c; then  
> &nbsp;&nbsp;$echo 'x -' SKIPPING 'players/ne\_queue.rb' '(file already exists)'  
> else  
> &nbsp;&nbsp;$echo 'x -' extracting 'players/ne\_queue.rb' '(binary)'  
> &nbsp;&nbsp;sed 's/^X//' \<\< 'SHAR\_EOF' | uudecode &&  
> begin 600 players/ne\_queue.rb  
> M8VQA\<W,@3D51=65U95!L87EE\<B`\(%!L87EE\<@T\*"5%5155%(#T@6R`-"@D)  
> M.G)O8VLL(#IR;V-K+"`Z\<F]C:RP@.G)O8VLL#0H)"3IS8VES\<V]R\<RP@.G-C  
> M:7-S;W)S+"`Z\<&%P97(L(#IS8VES\<V]R\<RP-"@D).G!A\<&5R+"`Z\<&%P97(L  
> M(#IS8VES\<V]R\<RP@.G!A\<&5R+"`-"@D).G)O8VLL(#IR;V-K+"`Z\<F]C:RP@  
> M.G-C:7-S;W)S+`T*"0DZ\<&%P97(L(#IS8VES\<V]R\<RP@.G-C:7-S;W)S+"`Z  
> M\<&%P97(L#0H)"3IR;V-K+"`Z\<&%P97(L(#IP87!E\<BP@.G)O8VLL#0H)"3IS  
> M8VES\<V]R\<RP@.G!A\<&5R+"`Z\<F]C:RP@.G)O8VLL#0H)"3IS8VES\<V]R\<RP@  
> M.G)O8VLL(#IS8VES\<V]R\<RP@.G-C:7-S;W)S+`T\*"0DZ\<&%P97(L(#IS8VES  
> M\<V]R\<RP@.G!A\<&5R+"`Z\<&%P97(@#0H)70T\*"61E9B!I;FET:6%L:7IE\*"!O  
> M\<'!O;F5N="`I#0H)"7-U\<&5R#0H)0&EN9&5X(#T@,`T*"65N9`T\*"61E9B!C  
> M:&]O\<V4-"@D)8VAO:6-E(#T@455%545;0&EN9&5X70T\*"0E`:6YD97@@\*ST@  
> M,0T\*"0E`:6YD97@@/2`P(&EF($!I;F1E\>"`]/2!1545512YS:7IE#0H)"6-H  
> /;VEC90T\*"65N9`T\*96YD  
> `  
> end  
> SHAR\_EOF  
> &nbsp;&nbsp;(set 20 05 01 23 15 39 04 'players/ne\_queue.rb'; eval "$shar\_touch") &&  
> &nbsp;&nbsp;chmod 0644 'players/ne\_queue.rb' ||  
> &nbsp;&nbsp;$echo 'restore of' 'players/ne\_queue.rb' 'failed'  
> &nbsp;&nbsp;if ( md5sum --help 2\>&1 | grep 'sage: md5sum \[' ) \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&& ( md5sum --version 2\>&1 | grep -v 'textutils 1.12' ) \>/dev/null; then  
> &nbsp;&nbsp;&nbsp;&nbsp;md5sum -c \<\< SHAR\_EOF \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&nbsp;&nbsp;\>\> $echo 'players/ne\_queue.rb:' 'MD5 check failed'  
> 3259093536e9765638990620064d3bc5 players/ne\_queue.rb  
> SHAR\_EOF  
> &nbsp;&nbsp;else  
> &nbsp;&nbsp;&nbsp;&nbsp;shar\_count="`LC_ALL= LC_CTYPE= LANG= wc -c \< 'players/ne_queue.rb'`"  
> &nbsp;&nbsp;&nbsp;&nbsp;test 555 -eq "$shar\_count" ||  
> &nbsp;&nbsp;&nbsp;&nbsp;$echo 'players/ne\_queue.rb:' 'original size' '555,' 'current size'  
> "$shar\_count!"  
> &nbsp;&nbsp;fi  
> fi  
> # ============= players/ne\_rand.rb ==============  
> if test -f 'players/ne\_rand.rb' && test "$first\_param" != -c; then  
> &nbsp;&nbsp;$echo 'x -' SKIPPING 'players/ne\_rand.rb' '(file already exists)'  
> else  
> &nbsp;&nbsp;$echo 'x -' extracting 'players/ne\_rand.rb' '(binary)'  
> &nbsp;&nbsp;sed 's/^X//' \<\< 'SHAR\_EOF' | uudecode &&  
> begin 600 players/ne\_rand.rb  
> M8VQA\<W,@3F5O;F5Y95)A;F0@/"!0;&%Y97(-"@E1545512`](%L@.G)O8VLL  
> M#0H)"3IS8VES\<V]R\<RP-"@D).G-C:7-S;W)S(%T-"@T\*"61E9B!I;FET:6%L  
> M:7IE\*"!O\<'!O;F5N="`I#0H)"7-U\<&5R#0H)"4!I;F1E\>"`](#`-"@D)0&AI  
> M\<W1O\<GD@/2!;70T\*"65N9`T\*#0H)9&5F(&-H;V]S90T\*"0ER971U\<FX@.G)O  
> M8VL@:68@0&AI\<W1O\<GDN96UP='D\_#0H)"0T\*"0EY;W4L('1H96TL('=L9"`]  
> M($!H:7-T;W)Y+FQA\<W0-"@D)8V%S92!W;&0-"@D)=VAE;B`Z9')A=PT\*"0D)  
> M0&EN9&5X(#T@\*$!I;F1E\>"`K(%%5155%+G-I\>F4@*R`Q("T@\<F%N9"@R\*2D@  
> M)2!1545512YS:7IE#0H)"0ER971U\<FX@455%545;0&EN9&5X70T\*"0EW:&5N  
> M(#IL;W-E#0H)"0EB970@/2`H\<F%N9"@Q,#`I(#X@-S4I(#\@,"`Z(#(-"@D)  
> M"4!I;F1E\>"`]("A`:6YD97@@\*R!B970I("4@455%544N\<VEZ90T\*"0D)\<F5T  
> M=7)N(%%5155%6T!I;F1E\>%T-"@D)=VAE;B`Z=VEN#0H)"0EB970@/2`H\<F%N  
> M9"@Q,#`I(#X@.#`I(#\@,2`Z(#`-"@D)"4!I;F1E\>"`]("A`:6YD97@@\*R!B  
> M970I("4@455%544N\<VEZ90T\*"0D)\<F5T=7)N(%%5155%6T!I;F1E\>%T-"@D)  
> M96YD#0H)"3IR;V-K#0H)96YD#0H)"0T\*"61E9B!R97-U;'0H('EO=2P@=&AE  
> M;2P@=VEN7VQO\<V5?;W)?9')A=R`I#0H)"4!H:7-T;W)Y(#P\(%MY;W4L('1H  
> @96TL('=I;E]L;W-E7V]R7V1R87==#0H)96YD#0IE;F1Y  
> `  
> end  
> SHAR\_EOF  
> &nbsp;&nbsp;(set 20 05 01 23 15 39 04 'players/ne\_rand.rb'; eval "$shar\_touch") &&  
> &nbsp;&nbsp;chmod 0644 'players/ne\_rand.rb' ||  
> &nbsp;&nbsp;$echo 'restore of' 'players/ne\_rand.rb' 'failed'  
> &nbsp;&nbsp;if ( md5sum --help 2\>&1 | grep 'sage: md5sum \[' ) \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&& ( md5sum --version 2\>&1 | grep -v 'textutils 1.12' ) \>/dev/null; then  
> &nbsp;&nbsp;&nbsp;&nbsp;md5sum -c \<\< SHAR\_EOF \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&nbsp;&nbsp;\>\> $echo 'players/ne\_rand.rb:' 'MD5 check failed'  
> 9df2864007f62d8a563f0780128fd754 players/ne\_rand.rb  
> SHAR\_EOF  
> &nbsp;&nbsp;else  
> &nbsp;&nbsp;&nbsp;&nbsp;shar\_count="`LC_ALL= LC_CTYPE= LANG= wc -c \< 'players/ne_rand.rb'`"  
> &nbsp;&nbsp;&nbsp;&nbsp;test 707 -eq "$shar\_count" ||  
> &nbsp;&nbsp;&nbsp;&nbsp;$echo 'players/ne\_rand.rb:' 'original size' '707,' 'current size'  
> "$shar\_count!"  
> &nbsp;&nbsp;fi  
> fi  
> # ============= players/ne\_antibias.rb ==============  
> if test -f 'players/ne\_antibias.rb' && test "$first\_param" != -c; then  
> &nbsp;&nbsp;$echo 'x -' SKIPPING 'players/ne\_antibias.rb' '(file already exists)'  
> else  
> &nbsp;&nbsp;$echo 'x -' extracting 'players/ne\_antibias.rb' '(binary)'  
> &nbsp;&nbsp;sed 's/^X//' \<\< 'SHAR\_EOF' | uudecode &&  
> begin 600 players/ne\_antibias.rb  
> M8VQA\<W,@3F5O;F5Y94%N=&EB:6%S(#P@4&QA\>65R#0H)455%544@/2!;(#IS  
> M8VES\<V]R\<RP@.G)O8VLL(#IP87!E\<B!=#0H)9&5F(&EN:71I86QI\>F4H(&]P  
> M\<&]N96YT("D-"@D)\<W5P97(-"@D)0&AI\<W1O\<GD@/2!;70T\*"0E`8V]U;G0@  
> M/2`P#0H)"4!L;W-E(#T@6UT-"@D)0&1R87\<@/2!;70T\*"0E`=VEN(#T@6UT-  
> M"@D)0&-O=6YT\<R`]('LZ\<V-I\<W-O\<G,]/C`L(#IR;V-K/3XP+"`Z\<&%P97(]  
> M/C`@?0T*"65N9`T\*"61E9B!Q\<PT\*"0E1545512YS:7IE#0H)96YD#0H)9&5F  
> M('%U975E\*&DI#0H)"5%5155%6VD@)2!1545512YS:7IE70T\*"65N9`T\*"61E  
> M9B!C:&%N8V4H;&5V96PL(&$L(&(I#0H)"2AR86YD\*#$P,"D@/"!L979E;"D@  
> M/R!A(#H@8@T\*"65N9`T\*"61E9B!C:&]O\<V4-"@D)0&-O=6YT("L](#$-"@D)  
> M#0H)"2,@,7-T('-T\<F%T96=Y.B!T\<GD@86QL(&-O;6)I;F%T:6]N\<PT\*"0ER  
> M971U\<FX@\<75E=64H0&-O=6YT+3$I(&EF($!C;W5N="`\/2!Q\<PT\*"0D-"@D)  
> M(R`R;F0@\<W1R871E9WDZ('!L87D@;VX@=&AO\<V4@=VAE\<F4@=V4@=V]N#0H)  
> M"6EF($!C;W5N="`\/2!Q\<RHR#0H)"0EY;W4L('1H96TL('=L9"`]($!H:7-T  
> M;W)Y6T!C;W5N="`M('%S("T@,5T-"@D)"7)E='5R;B!C87-E('=L9`T\*"0D)  
> M=VAE;B`Z9')A=SH@8VAA;F-E*#\<U+"!T:&5M+"!Q=65U92A`8V]U;G0@+2`Q  
> M\*2D-"@D)"7=H96X@.FQO\<V4Z('1H96T-"@D)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(&EF('9P\*VP@/B!V\<B!A;F0@  
> M=G`K;"`^('9S#0H)"0D)"0D-"@D)\<F5T=7)N(&-H86YC92@Q,"P@8F5T+"`H  
> M=VQD("$](#IL;W-E\*2`\_('1H96T@.B!C:&]I8V4I#0H)96YD#0H)"0T\*"61E  
> M9B!R97-U;'0H('EO=2P@=&AE;2P@=VEN7VQO\<V5?;W)?9')A=R`I#0H)"4!C  
> M;W5N='-;\>6]U72`K/2`Q#0H)"6-A\<V4@=VEN7VQO\<V5?;W)?9')A=R`-"@D)  
> M=VAE;B`Z;&]S93H@0&QO\<V4@/#P@6WEO=2P@=&AE;5T-"@D)=VAE;B`Z9')A  
> M=SH@0&1R87\<@/#P@6WEO=2P@=&AE;5T-"@D)=VAE;B`Z=VEN.B`@0'=I;B`\  
> M/"!;\>6]U+"!T:&5M70T\*"0EE;F0-"@D)0&AI\<W1O\<GD@/#P@6WEO=2P@=&AE  
> ?;2P@=VEN7VQO\<V5?;W)?9')A=UT-"@EE;F0-"F5N9'D@  
> `  
> end  
> SHAR\_EOF  
> &nbsp;&nbsp;(set 20 05 01 23 15 39 04 'players/ne\_antibias.rb'; eval "$shar\_touch") &&  
> &nbsp;&nbsp;chmod 0644 'players/ne\_antibias.rb' ||  
> &nbsp;&nbsp;$echo 'restore of' 'players/ne\_antibias.rb' 'failed'  
> &nbsp;&nbsp;if ( md5sum --help 2\>&1 | grep 'sage: md5sum \[' ) \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&& ( md5sum --version 2\>&1 | grep -v 'textutils 1.12' ) \>/dev/null; then  
> &nbsp;&nbsp;&nbsp;&nbsp;md5sum -c \<\< SHAR\_EOF \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&nbsp;&nbsp;\>\> $echo 'players/ne\_antibias.rb:' 'MD5 check failed'  
> 5e97bc2a6069f46ca39e44c12f0f442e players/ne\_antibias.rb  
> SHAR\_EOF  
> &nbsp;&nbsp;else  
> &nbsp;&nbsp;&nbsp;&nbsp;shar\_count="`LC_ALL= LC_CTYPE= LANG= wc -c \< 'players/ne_antibias.rb'`"  
> &nbsp;&nbsp;&nbsp;&nbsp;test 1786 -eq "$shar\_count" ||  
> &nbsp;&nbsp;&nbsp;&nbsp;$echo 'players/ne\_antibias.rb:' 'original size' '1786,' 'current  
> size' "$shar\_count!"  
> &nbsp;&nbsp;fi  
> fi  
> # ============= players/ne\_treshold.rb ==============  
> if test -f 'players/ne\_treshold.rb' && test "$first\_param" != -c; then  
> &nbsp;&nbsp;$echo 'x -' SKIPPING 'players/ne\_treshold.rb' '(file already exists)'  
> else  
> &nbsp;&nbsp;$echo 'x -' extracting 'players/ne\_treshold.rb' '(binary)'  
> &nbsp;&nbsp;sed 's/^X//' \<\< 'SHAR\_EOF' | uudecode &&  
> begin 600 players/ne\_treshold.rb  
> M8VQA\<W,@3F5O;F5Y951H\<F5S:&]L9"`\(%!L87EE\<@T\*"5%5155%(#T@6R`Z  
> M\<F]C:RP-"@D).G-C:7-S;W)S+`T\*"0DZ\<&%P97(L#0H)"3IP87!E\<BP-"@D)  
> M.G!A\<&5R+`T\*"0DZ\<F]C:RP-"@D).G!A\<&5R+`T\*"0DZ\<F]C:RP-"@D).G-C  
> M:7-S;W)S(%T-"@T\*"61E9B!I;FET:6%L:7IE\*"!O\<'!O;F5N="`I#0H)"7-U  
> M\<&5R#0H)"4!I;F1E\>"`](#`-"@D)0&AI\<W1O\<GD@/2!;70T\*"0E`8V]U;G0@  
> M/2`P#0H)"4!L;W-T(#T@,`T\*"0D-"@D)0'-T\<F%T96=Y(#T@.F-H;V]S95]R  
> M86YD;VT-"@D)0&QE=F5L,2`](#\<U#0H)"4!L979E;#(@/2`Y,`T*"65N9`T\*  
> M#0H)9&5F(&-H;V]S90T\*"0EI9B!`8V]U;G0@/3T@-3`@86YD($!L;W-T(#X@  
> M-0T\*"0D)(W`@(F-H86YG:6YG('-T\<F%T96=Y(@T\*"0D)0&QE=F5L,2`](#\<U  
> M#0H)"0E`;&5V96PR(#T@,3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E;F0-"@D-"@ED968@  
> M8VAO;W-E7W%U975E#0H)"4!I;F1E\>"`]("A`:6YD97@@\*R`Q*2`E(%%5155%  
> M+G-I\>F4-"@D)\<F5T=7)N(%%5155%6T!I;F1E\>%T-"@EE;F0-"@D)#0H)9&5F  
> M(')E\<W5L="@@\>6]U+"!T:&5M+"!W:6Y?;&]S95]O\<E]D\<F%W("D-"@D)0&QO  
> M\<W0@\*ST@,2!I9B!W:6Y?;&]S95]O\<E]D\<F%W(#T](#IL;W-E#0H)"4!H:7-T  
> M;W)Y(#P\(%MY;W4L('1H96TL('=I;E]L;W-E7V]R7V1R87==#0H)96YD#0IE  
> ";F1Y  
> `  
> end  
> SHAR\_EOF  
> &nbsp;&nbsp;(set 20 05 01 23 15 39 04 'players/ne\_treshold.rb'; eval "$shar\_touch") &&  
> &nbsp;&nbsp;chmod 0644 'players/ne\_treshold.rb' ||  
> &nbsp;&nbsp;$echo 'restore of' 'players/ne\_treshold.rb' 'failed'  
> &nbsp;&nbsp;if ( md5sum --help 2\>&1 | grep 'sage: md5sum \[' ) \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&& ( md5sum --version 2\>&1 | grep -v 'textutils 1.12' ) \>/dev/null; then  
> &nbsp;&nbsp;&nbsp;&nbsp;md5sum -c \<\< SHAR\_EOF \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&nbsp;&nbsp;\>\> $echo 'players/ne\_treshold.rb:' 'MD5 check failed'  
> 4421a31f3a80c43e74d69bbc4b513020 players/ne\_treshold.rb  
> SHAR\_EOF  
> &nbsp;&nbsp;else  
> &nbsp;&nbsp;&nbsp;&nbsp;shar\_count="`LC_ALL= LC_CTYPE= LANG= wc -c \< 'players/ne_treshold.rb'`"  
> &nbsp;&nbsp;&nbsp;&nbsp;test 1397 -eq "$shar\_count" ||  
> &nbsp;&nbsp;&nbsp;&nbsp;$echo 'players/ne\_treshold.rb:' 'original size' '1397,' 'current  
> size' "$shar\_count!"  
> &nbsp;&nbsp;fi  
> fi  
> # ============= players/ne\_stupid.rb ==============  
> if test -f 'players/ne\_stupid.rb' && test "$first\_param" != -c; then  
> &nbsp;&nbsp;$echo 'x -' SKIPPING 'players/ne\_stupid.rb' '(file already exists)'  
> else  
> &nbsp;&nbsp;$echo 'x -' extracting 'players/ne\_stupid.rb' '(binary)'  
> &nbsp;&nbsp;sed 's/^X//' \<\< 'SHAR\_EOF' | uudecode &&  
> begin 600 players/ne\_stupid.rb  
> M8VQA\<W,@3F5O;F5Y95-T=7!I9"`\(%!L87EE\<@T\*"5%5155%(#T@6R`Z\<V-I  
> M\<W-O\<G,L(#IR;V-K+"`Z\<&%P97(@70T\*"61E9B!I;FET:6%L:7IE\*"!O\<'!O  
> M;F5N="`I#0H)"7-U\<&5R#0H)"4!H:7-T;W)Y(#T@6UT-"@D)0&-O=6YT(#T@  
> M,`T*"0E`;&]S92`](%M=#0H)"4!D\<F%W(#T@6UT-"@D)0'=I;B`](%M=#0H)  
> M96YD#0H)9&5F('%S#0H)"5%5155%+G-I\>F4-"@EE;F0-"@ED968@\<75E=64H  
> M:2D-"@D)455%545;:2`E(%%5155%+G-I\>F5=#0H)96YD#0H)9&5F(&-H86YC  
> M92AL979E;"P@82P@8BD-"@D)\*')A;F0H,3`P*2`\(&QE=F5L\*2`\_(&$@.B!B  
> M#0H)96YD#0H)9&5F(&-H;V]S90T\*"0E`8V]U;G0@\*ST@,0T\*"0D-"@D)(R`Q  
> M\<W0@\<W1R871E9WDZ('1R\>2!A;&P@8V]M8FEN871I;VYS#0H)"7)E='5R;B!Q  
> M=65U92A`8V]U;G0M,2D@:68@0&-O=6YT(#P]('%S#0H)"0T\*"0DC(#)N9"!S  
> M=')A=&5G\>3H@\<&QA\>2!O;B!T:&]S92!W:&5R92!W92!W;VX-"@D):68@0&-O  
> M=6YT(#P]('%S\*C(-"@D)"7EO=2P@=&AE;2P@=VQD(#T@0&AI\<W1O\<GE;0&-O  
> M=6YT("T@\<7,@+2`Q70T\*"0D)\<F5T=7)N(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('1H96T-"@D)=VAE;B`Z=VEN.B!Y;W4-  
> M"@D)96YD#0H)"0T\*"0EI9B!`;&]S92YS:7IE(#X@0'=I;BYS:7IE#0H)"0ER  
> M971U\<FX@=&AE;0T\*"0EE;F0-"@D)"0D)"0T\*"0ER971U\<FX@8VAO:6-E#0H)  
> M96YD#0H)"0T\*"61E9B!R97-U;'0H('EO=2P@=&AE;2P@=VEN7VQO\<V5?;W)?  
> M9')A=R`I#0H)"6-A\<V4@=VEN7VQO\<V5?;W)?9')A=R`-"@D)=VAE;B`Z;&]S  
> M93H@0&QO\<V4@/#P@6WEO=2P@=&AE;5T-"@D)=VAE;B`Z9')A=SH@0&1R87\<@  
> M/#P@6WEO=2P@=&AE;5T-"@D)=VAE;B`Z=VEN.B`@0'=I;B`\/"!;\>6]U+"!T  
> M:&5M70T\*"0EE;F0-"@D)0&AI\<W1O\<GD@/#P@6WEO=2P@=&AE;2P@=VEN7VQO  
> 6\<V5?;W)?9')A=UT-"@EE;F0-"F5N9'D@  
> `  
> end  
> SHAR\_EOF  
> &nbsp;&nbsp;(set 20 05 01 23 15 39 04 'players/ne\_stupid.rb'; eval "$shar\_touch") &&  
> &nbsp;&nbsp;chmod 0644 'players/ne\_stupid.rb' ||  
> &nbsp;&nbsp;$echo 'restore of' 'players/ne\_stupid.rb' 'failed'  
> &nbsp;&nbsp;if ( md5sum --help 2\>&1 | grep 'sage: md5sum \[' ) \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&& ( md5sum --version 2\>&1 | grep -v 'textutils 1.12' ) \>/dev/null; then  
> &nbsp;&nbsp;&nbsp;&nbsp;md5sum -c \<\< SHAR\_EOF \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&nbsp;&nbsp;\>\> $echo 'players/ne\_stupid.rb:' 'MD5 check failed'  
> d0b6e5c0c587ee049f83b845a9ffc6d5 players/ne\_stupid.rb  
> SHAR\_EOF  
> &nbsp;&nbsp;else  
> &nbsp;&nbsp;&nbsp;&nbsp;shar\_count="`LC_ALL= LC_CTYPE= LANG= wc -c \< 'players/ne_stupid.rb'`"  
> &nbsp;&nbsp;&nbsp;&nbsp;test 1642 -eq "$shar\_count" ||  
> &nbsp;&nbsp;&nbsp;&nbsp;$echo 'players/ne\_stupid.rb:' 'original size' '1642,' 'current  
> size' "$shar\_count!"  
> &nbsp;&nbsp;fi  
> fi  
> # ============= players/ne\_cont\_queue.rb ==============  
> if test -f 'players/ne\_cont\_queue.rb' && test "$first\_param" != -c; then  
> &nbsp;&nbsp;$echo 'x -' SKIPPING 'players/ne\_cont\_queue.rb' '(file already exists)'  
> else  
> &nbsp;&nbsp;$echo 'x -' extracting 'players/ne\_cont\_queue.rb' '(binary)'  
> &nbsp;&nbsp;sed 's/^X//' \<\< 'SHAR\_EOF' | uudecode &&  
> begin 600 players/ne\_cont\_queue.rb  
> M8VQA\<W,@3F5O;F5Y94-O;G11=65U92`\(%!L87EE\<@T\*"5%5155%(#T@6R`Z  
> M\<F]C:RP@.G-C:7-S;W)S+"`Z\<&%P97(L(#IP87!E\<BP@.G)O8VLL(#IS8VES  
> M\<V]R\<R!=#0H)9&5F(&EN:71I86QI\>F4H(&]P\<&]N96YT("D-"@D)\<W5P97(-  
> M"@D)0')E\<W5M92`](&QA;6)D82![?0T*"0E`:6YD97@@/2`P#0H)96YD#0H)  
> M9&5F(&-H;V]S90T\*"0EC86QL8V-[?$!R97-U;65\?0T\*"0E`:6YD97@@/2`H  
> M0&EN9&5X("L@,2D@)2!1545512YS:7IE#0H)"2-1545515MR86YD\*%%5155%  
> M+G-I\>F4I70T\*"0E1545515M`:6YD97A=#0H)96YD#0H)9&5F(')E\<W5L="@@
> 
> > 6]U+"!T:&5M+"!W:6Y?;&]S95]O\<E]D\<F%W("D-"@D)0')E\<W5M92YC86QL
> 
> H(&EF('=I;E]L;W-E7V]R7V1R87\<@/3T@.FQO\<V4-"@EE;F0-"F5N9"YC  
> `  
> end  
> SHAR\_EOF  
> &nbsp;&nbsp;(set 20 05 01 23 15 39 04 'players/ne\_cont\_queue.rb'; eval "$shar\_touch") &&  
> &nbsp;&nbsp;chmod 0644 'players/ne\_cont\_queue.rb' ||  
> &nbsp;&nbsp;$echo 'restore of' 'players/ne\_cont\_queue.rb' 'failed'  
> &nbsp;&nbsp;if ( md5sum --help 2\>&1 | grep 'sage: md5sum \[' ) \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&& ( md5sum --version 2\>&1 | grep -v 'textutils 1.12' ) \>/dev/null; then  
> &nbsp;&nbsp;&nbsp;&nbsp;md5sum -c \<\< SHAR\_EOF \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&nbsp;&nbsp;\>\> $echo 'players/ne\_cont\_queue.rb:' 'MD5 check failed'  
> 6a81061c36cfd276a19c7b514b762360 players/ne\_cont\_queue.rb  
> SHAR\_EOF  
> &nbsp;&nbsp;else  
> &nbsp;&nbsp;&nbsp;&nbsp;shar\_count="`LC_ALL= LC_CTYPE= LANG= wc -c \< 'players/ne_cont_queue.rb'`"  
> &nbsp;&nbsp;&nbsp;&nbsp;test 400 -eq "$shar\_count" ||  
> &nbsp;&nbsp;&nbsp;&nbsp;$echo 'players/ne\_cont\_queue.rb:' 'original size' '400,' 'current  
> size' "$shar\_count!"  
> &nbsp;&nbsp;fi  
> fi  
> # ============= players/ne\_cont\_rand.rb ==============  
> if test -f 'players/ne\_cont\_rand.rb' && test "$first\_param" != -c; then  
> &nbsp;&nbsp;$echo 'x -' SKIPPING 'players/ne\_cont\_rand.rb' '(file already exists)'  
> else  
> &nbsp;&nbsp;$echo 'x -' extracting 'players/ne\_cont\_rand.rb' '(binary)'  
> &nbsp;&nbsp;sed 's/^X//' \<\< 'SHAR\_EOF' | uudecode &&  
> begin 600 players/ne\_cont\_rand.rb  
> M8VQA\<W,@3F5O;F5Y94-O;G1286YD(#P@4&QA\>65R#0H)455%544@/2!;(#IR  
> M;V-K+"`Z\<V-I\<W-O\<G,L(#IP87!E\<B!=#0H)9&5F(&EN:71I86QI\>F4H(&]P  
> M\<&]N96YT("D-"@D)\<W5P97(-"@D)0')E\<W5M92`](&QA;6)D82![?0T\*"65N  
> M9`T\*"61E9B!C:&]O\<V4-"@D)8V%L;&-C\>WQ`\<F5S=6UE?'T-"@D)455%545;  
> M\<F%N9"A1545512YS:7IE\*5T-"@EE;F0-"@ED968@\<F5S=6QT\*"!Y;W4L('1H  
> M96TL('=I;E]L;W-E7V]R7V1R87\<@\*0T\*"0E`\<F5S=6UE+F-A;&P@:68@=VEN  
> A7VQO\<V5?;W)?9')A=R`]/2`Z;&]S90T\*"65N9`T\*96YD  
> `  
> end  
> SHAR\_EOF  
> &nbsp;&nbsp;(set 20 05 01 23 15 39 04 'players/ne\_cont\_rand.rb'; eval "$shar\_touch") &&  
> &nbsp;&nbsp;chmod 0644 'players/ne\_cont\_rand.rb' ||  
> &nbsp;&nbsp;$echo 'restore of' 'players/ne\_cont\_rand.rb' 'failed'  
> &nbsp;&nbsp;if ( md5sum --help 2\>&1 | grep 'sage: md5sum \[' ) \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&& ( md5sum --version 2\>&1 | grep -v 'textutils 1.12' ) \>/dev/null; then  
> &nbsp;&nbsp;&nbsp;&nbsp;md5sum -c \<\< SHAR\_EOF \>/dev/null 2\>&1 \  
> &nbsp;&nbsp;&nbsp;&nbsp;\>\> $echo 'players/ne\_cont\_rand.rb:' 'MD5 check failed'  
> b58dc408275f688d35443ec344b92f83 players/ne\_cont\_rand.rb  
> SHAR\_EOF  
> &nbsp;&nbsp;else  
> &nbsp;&nbsp;&nbsp;&nbsp;shar\_count="`LC_ALL= LC_CTYPE= LANG= wc -c \< 'players/ne_cont_rand.rb'`"  
> &nbsp;&nbsp;&nbsp;&nbsp;test 303 -eq "$shar\_count" ||  
> &nbsp;&nbsp;&nbsp;&nbsp;$echo 'players/ne\_cont\_rand.rb:' 'original size' '303,' 'current  
> size' "$shar\_count!"  
> &nbsp;&nbsp;fi  
> fi  
> rm -fr \_sh06382  
> exit 0

---

<div class="post-metadata">

**Author:** ![Florian\_Gross](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@Florian\_Gross](https://rubytalk.org/u/Florian_Gross)\
**Post date:** [23 January 2005 17:25 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932/24 "2005-01-23T17:25:56Z")

</div>

James Edward Gray II wrote:

> Protecting yourself, eh? That looks like a challenge. Anyone want to out cheat this cheater? It can be done!

Use .freeze or the method\_added etc. hooks. 🙂

---

<div class="post-metadata">

**Author:** ![James\_Edward\_Gray\_II](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@James\_Edward\_Gray\_II](https://rubytalk.org/u/James_Edward_Gray_II)\
**Post date:** [23 January 2005 18:22 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932/25 "2005-01-23T18:22:44Z")

</div>

Thanks for the link. Here's a good quote from there:

&nbsp;&nbsp;lypanov notes that the quiz is a bit silly as the reason many good players win in real life  
&nbsp;&nbsp;is because they react fast to the hand formations so unless you have a real person playing  
&nbsp;&nbsp;against a bot guessing the players move by recognition, its kind of boring 😛

Actually, this is one of the reasons I chose to use Paper Rock Scissors. I could have easily picked something with a little more strategy. 😉

James Edward Gray II

> **···**
>
> On Jan 23, 2005, at 12:01 PM, Christian Neukirchen wrote:
> 
> > James Edward Gray II \<james@grayproductions.net\> writes:
> > 
> > > On Jan 23, 2005, at 7:31 AM, Christian Neukirchen wrote:
> > > 
> > > > First, congratulations to this great quiz. It was a great fun for me  
> > > > and other people on #ruby-lang.
> > > 
> > > Any interesting discussion occur on the channel you would like to  
> > > share with the rest of the group?
> > > 
> > > James Edward Gray II
> > 
> > Check:
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[http://meme.b9.com/cview.html?channel=ruby-lang&date=050122](http://meme.b9.com/cview.html?channel=ruby-lang&date=050122)
> > 
> > 11 o'clock and later.

---

<div class="post-metadata">

**Author:** ![Florian\_Gross](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@Florian\_Gross](https://rubytalk.org/u/Florian_Gross)\
**Post date:** [23 January 2005 21:30 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932/26 "2005-01-23T21:30:53Z")

</div>

Benedikt Huber wrote:

> This is impossible for players which do not cheat.  
> You can't give any predictions on the next move of a random player.  
> Therefore you have a 1/3 prop. to choose a winning,losing or drawing move.
> 
> Here is another 'cheater' (which does not redefine a method):

This is similar to my solution, but mine does also copy the state of its enemy.

---

<div class="post-metadata">

**Author:** ![Jacob\_Fugal](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@Jacob\_Fugal](https://rubytalk.org/u/Jacob_Fugal)\
**Post date:** [25 January 2005 03:17 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932/27 "2005-01-25T03:17:26Z")

</div>

This 'cheater' isn't gauranteed. Try it against this naive random player:

class RandomPlayer \< Player  
&nbsp;&nbsp;&nbsp;def initialize( opponent )  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super  
&nbsp;&nbsp;&nbsp;end

&nbsp;&nbsp;def choose  
&nbsp;&nbsp;&nbsp;&nbsp;[:paper, :scissors, :rock][rand(3)]  
&nbsp;&nbsp;end

&nbsp;&nbsp;def result(you,them,result)  
&nbsp;&nbsp;end  
end

There's no gaurantee that the answer you get from @opp.choose will be  
the same one the referee gets when he calls choose on the bot. 🙂

Jacob Fugal

> **···**
>
> On Mon, 24 Jan 2005 05:15:52 +0900, Benedikt Huber \<benjovi@gmx.net\> wrote:
> 
> > Here is another 'cheater' (which does not redefine a method):
> > 
> > SYMBOLS = [ :rock,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:paper,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:scissors ]  
> > KILLER = { :rock =\> :paper, :paper =\> :scissors, :scissors =\> :rock }
> > 
> > class BHCheatPlayer \< Player
> > 
> > &nbsp;&nbsp;def initialize( opponent )  
> > &nbsp;&nbsp;&nbsp;&nbsp;super  
> > &nbsp;&nbsp;&nbsp;&nbsp;@opp = Object.const\_get(opponent).new(self)  
> > &nbsp;&nbsp;end
> > 
> > &nbsp;&nbsp;def choose  
> > &nbsp;&nbsp;&nbsp;&nbsp;KILLER[@opp.choose]  
> > &nbsp;&nbsp;end
> > 
> > &nbsp;&nbsp;def result(you,them,result)  
> > &nbsp;&nbsp;&nbsp;&nbsp;@opp.result(them,you,result)  
> > &nbsp;&nbsp;end
> > 
> > end

---

<div class="post-metadata">

**Author:** ![James\_Edward\_Gray\_II](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@James\_Edward\_Gray\_II](https://rubytalk.org/u/James_Edward_Gray_II)\
**Post date:** [25 January 2005 03:29 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932/28 "2005-01-25T03:29:32Z")

</div>

Still, it's a mighty clever trick against many strategies.

James Edward Gray II

> **···**
>
> On Jan 24, 2005, at 9:17 PM, Jacob Fugal wrote:
> 
> > There's no gaurantee that the answer you get from @opp.choose will be  
> > the same one the referee gets when he calls choose on the bot. 🙂

---

<div class="post-metadata">

**Author:** ![Florian\_Gross](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@Florian\_Gross](https://rubytalk.org/u/Florian_Gross)\
**Post date:** [25 January 2005 20:15 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932/29 "2005-01-25T20:15:48Z")

</div>

Jacob Fugal wrote:

> This 'cheater' isn't gauranteed. Try it against this naive random player:
> 
> &nbsp;&nbsp;def choose  
> &nbsp;&nbsp;&nbsp;&nbsp;[:paper, :scissors, :rock][rand(3)]  
> &nbsp;&nbsp;end

Still, even in that situation you will pick an attack against a random invalid move which means you'll still have a 50% chance of winning.

---

<div class="post-metadata">

**Author:** ![bananafishbones](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@bananafishbones](https://rubytalk.org/u/bananafishbones)\
**Post date:** [25 January 2005 17:05 UTC](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932/30 "2005-01-25T17:05:10Z")

</div>

An alternate solution to the Rock, Paper, Scissors problem.

> **[Machine Learns Games - Slashdot](https://science.slashdot.org/story/05/01/25/0225218/machine-learns-games)**
>
> heptapod writes "New Scientist is reporting that UK researchers have created a computer that can learn rock, paper, scissors by observing humans. CogVis uses visual information to recognize events and objects in addition to learning by observing."...

[http://www.comp.leeds.ac.uk/vision/cogvis/games.html](http://www.comp.leeds.ac.uk/vision/cogvis/games.html)

> **···**
>
> On Tue, 25 Jan 2005 12:29:32 +0900, James Edward Gray II \<james@grayproductions.net\> wrote:
> 
> > On Jan 24, 2005, at 9:17 PM, Jacob Fugal wrote:
> > 
> > \> There's no gaurantee that the answer you get from @opp.choose will be  
> > \> the same one the referee gets when he calls choose on the bot. 🙂
> > 
> > Still, it's a mighty clever trick against many strategies.
> > 
> > James Edward Gray II

[Previous page](https://rubytalk.org/t/quiz-paper-rock-scissors-16/15932.md?page=1)
