import random import sys import robots def random_walk(whoami, state): my_robots = state.robots_by_player[whoami] return ''.join( random.choice('ULDRP') for _ in range(len(my_robots)) ) if __name__ == '__main__': name, = sys.argv[1:] server = robots.Server() server.SERVER_NAME = name server.add_simple_bot(random_walk, 'Bot1') server.add_simple_bot(random_walk, 'Bot2') server.run()