Search
You are a Thief in a grid-based maze. Your goal is to escape unseen. Your opponent must place a sensor to maximize the chance of your detection.
The game is played on a grid-based map as follows:
up
down
left
right
Your task is to compute a Nash equilibrium of both players in mixed strategies using the Double Oracle algorithm.
Your program must accept the maze definition from standard input, and must write the expected probability of detection to standard output, i.e. the expected usage is python main.py < cave.txt > visibility.txt.
python main.py < cave.txt > visibility.txt
You must not open, read or write to any files, and your standard output must contain only the probability without any debugging information.
You can use this template and example caves (and their values ) to simplify your implementation.
Maps have the following format:
###### #SE-D# #-##-# #--E-# ######
(- empty square, S start, D destination, E possible sensor spot, # wall)
-
S
D
E
#