5 # Created by Daniel Axtens on 28/07/10.
6 # Licensed under an MIT-style license: see the LICENSE file for details.
9 # You don't need to read this file. All you need to do is take agent-template.m
10 # and fill it in with your own functions. This file does all the I/O for you,
11 # and matlab-consts.m defines useful utilities and constants.
13 # Do not depend on the contents of this file. It may be changed for speed, security
14 # or other reasons and your bot may break if you depend on it. You have been warned.
18 while ( !strcmp( "BYE", in ) )
20 splitIn = strsplit( in, " " );
25 [attack, bluff] = Attack( splitIn{2} );
27 disp( [ "ATTACKING ", rps.itemToString{attack}, " ", \
28 rps.itemToString{bluff} ] );
31 defence = Defend( splitIn{2}, stringToItem(splitIn{3}) );
32 disp( [ "DEFENDING ", rps.itemToString{defence} ] );
35 Results( splitIn{2}, strcmp( splitIn{3}, "True" ), splitIn{4}, \
36 stringToItem(splitIn{5}), stringToItem(splitIn{6}), \
37 stringToItem(splitIn{7}), str2num(splitIn{8}) );