diff --git a/vamp_learn.ipynb b/vamp_learn.ipynb index 2af0275..59320c5 100644 --- a/vamp_learn.ipynb +++ b/vamp_learn.ipynb @@ -5,8 +5,8 @@ "colab": { "name": "vamp_learn.ipynb", "provenance": [], - "authorship_tag": "ABX9TyPPK9aYixkU9wBboEmwKEBs", - "include_colab_link": true + "collapsed_sections": [], + "authorship_tag": "ABX9TyPkXD7c0eIhXukc++kJznmv" }, "kernelspec": { "name": "python3", @@ -14,122 +14,1741 @@ } }, "cells": [ - { - "cell_type": "markdown", - "metadata": { - "id": "view-in-github", - "colab_type": "text" - }, - "source": [ - "\"Open" - ] - }, { "cell_type": "code", "metadata": { - "id": "jlxHrzQqwe0_" + "id": "jlxHrzQqwe0_", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "7c9bc540-0f26-4e85-969d-3163e856c235" }, "source": [ - "\n", - "Skip to content\n", - "Pull requests\n", - "Issues\n", - "Marketplace\n", - "Explore\n", - "@GeenDutchman\n", - "GeenDutchman /\n", - "vamp_learn\n", - "\n", - "1\n", - "0\n", - "\n", - " 0\n", - "\n", - "Code\n", - "Issues\n", - "Pull requests\n", - "Actions\n", - "Projects\n", - "Wiki\n", - "Security\n", - "Insights\n", - "\n", - " Settings\n", - "\n", - "vamp_learn/game.py /\n", - "@GeenDutchman\n", - "GeenDutchman first try\n", - "Latest commit aebc168 9 days ago\n", - "History\n", - "1 contributor\n", - "52 lines (37 sloc) 1.25 KB\n", "#python3\n", "\n", + "# start time oct 24 - 21:10 - 01:06\n", + "# read dqn paper nov 19 - 22:23 - 22:55\n", + "# add fog nov 25 - 23:15 - 23:33\n", + "# more on moves nov 26 - 8:00 - 9:00 | 9:49 - 12:21\n", + "\n", "import numpy as np\n", "\n", "\n", - "class Map_thing:\n", - " def __init__(self, t_char, mohs):\n", - " self.t_char = t_char\n", - " self.mohs = mohs\n", + "class Map_thing():\n", + " id = 0\n", + " def __init__(self, t_char, mohs):\n", + " self.t_char = t_char\n", + " self.mohs = mohs\n", + " self.id = Map_thing.id\n", + " self.row = None\n", + " self.col = None\n", + " Map_thing.id += 1\n", + "\n", + " def print_self(self):\n", + " return self.t_char\n", + "\n", + " def get_mohs(self):\n", + " return self.mohs\n", + "\n", + " def __repr__(self):\n", + " return self.t_char\n", + "\n", + " def __eq__(self, other):\n", + " return other != None and self.t_char == other.t_char and self.id == other.id\n", + "\n", + " def set_location(self, row, col):\n", + " self.row = row\n", + " self.col = col\n", + "\n", + "class Controller():\n", + " def __init__(self, move_func=None, responder=None, creature=None, looker=None):\n", + " self.move_func = move_func if move_func is not None else self._random\n", + " self.responder = responder if responder is not None else print\n", + " self.looker = looker if looker is not None else print\n", + " self.creature = creature\n", + "\n", + " def _random(self):\n", + " x = np.random.randint(0, 4)\n", + " if x == 0:\n", + " return 'north'\n", + " elif x == 1:\n", + " return 'south'\n", + " elif x == 2:\n", + " return 'east'\n", + " elif x == 3:\n", + " return 'west'\n", + " return x\n", + "\n", + " def look(self, look_info):\n", + " self.looker(look_info)\n", + "\n", + " def canMove(self):\n", + " if self.creature != None:\n", + " return self.creature.canMove()\n", + " return False\n", + " \n", + " def getMove(self):\n", + " return self.move_func()\n", + " \n", + " def sendResponse(self, message):\n", + " self.responder(message)\n", + "\n", + " def setCreature(self, creature):\n", + " self.creature = creature\n", + "\n", + " def getCreature(self):\n", + " return self.creature\n", + "\n", + "class SimpleController(Controller):\n", + " def __init__(self, creature=None, prey=None, responder=None, looker=None):\n", + " super().__init__(creature=creature, move_func=self._getMove, responder=responder, looker=looker)\n", + " self.prey = prey\n", + " if (self.creature == None or self.prey == None):\n", + " self.move_func = super()._random\n", + " self.last = ['', '']\n", + "\n", + " def _try_row(self, row_diff):\n", + " result = ''\n", + " if row_diff > 0:\n", + " result = 'north'\n", + " elif row_diff < 0:\n", + " result = 'south'\n", + " return result\n", + "\n", + " def _try_col(self, col_diff):\n", + " result = ''\n", + " if col_diff > 0:\n", + " result = 'west'\n", + " elif col_diff < 0:\n", + " result = 'east'\n", + " return result\n", + "\n", + " def sendResponse(self, message):\n", + " self.last[1] = message\n", + " super().sendResponse(message)\n", + "\n", + " def _getMove(self, fudge=0):\n", + " row_diff = (self.creature.row - self.prey.row) + fudge\n", + " col_diff = self.creature.col - self.prey.col\n", + "\n", + " result = ''\n", + " # print(self.creature.id, row_diff, col_diff)\n", + " if abs(row_diff) > abs(col_diff):\n", + " result = self._try_row(row_diff)\n", + " if result == '':\n", + " result = self._try_col(col_diff)\n", + " elif abs(row_diff) < abs(col_diff):\n", + " result = self._try_col(col_diff)\n", + " if result == '':\n", + " result = self._try_row(row_diff)\n", + " else:\n", + " result = self._getMove(np.random.rand() - .5) # make even chance\n", + "\n", + " if result == '':\n", + " result = self._random() \n", + "\n", + " super().sendResponse(str(result))\n", + " self.last = [result, '']\n", + " return result\n", + "\n", + "class ConsoleController(Controller):\n", + " def __init__(self, creature=None, responder=None):\n", + " super().__init__(creature=creature, move_func=self._getMove, responder=responder)\n", + " \n", + " def _getMove(self):\n", + " result = input(\"Your move >\")\n", + " return result\n", "\n", - " def print_self(self):\n", - " return self.t_char\n", + "class Creature(Map_thing):\n", + " def __init__(self, t_char, mohs, num_moves=1, wait_moves=0, drop_thing=None):\n", + " super().__init__(t_char, mohs)\n", + " self.num_moves = num_moves\n", + " self.max_wait = wait_moves\n", + " self.wait_count = self.max_wait\n", + " self.drop_thing = drop_thing\n", "\n", - " def get_mohs(self):\n", - " return self.mohs\n", + " def canMove(self):\n", + " if self.wait_count <= 0:\n", + " self.wait_count = self.max_wait\n", + " return True\n", + " self.wait_count -= 1\n", + " return False\n", + "\n", + " def getNumMoves(self):\n", + " return self.num_moves\n", + "\n", + " def getMove(self):\n", + " return self.controller.getMove()\n", + "\n", + " def sendResponse(self, message):\n", + " self.controller.sendResponse(message)\n", + "\n", + " def get_drop(self):\n", + " return self.drop_thing\n", "\n", "class Map:\n", - " def __init__(self, width, height, density ):\n", - " self.width = width\n", - " self.height = height\n", - " self.density = density\n", + " def __init__(self, width, height, density=20):\n", + " self.width = width\n", + " self.height = height\n", + " self.density = density\n", + "\n", + " self._wall = Map_thing(\"█\",10)\n", + " self._space = Map_thing(' ',0)\n", + " self._fog = Map_thing('*', 10)\n", + "\n", + " self._map = []\n", + " self.re_init_map(self.density)\n", + "\n", + " def re_init_map(self, density=None):\n", + " den = density if density is not None else self.density\n", + " self._map = []\n", + " for row in range(self.height):\n", + " the_row = []\n", + " if row == 0 or row == self.height - 1:\n", + " the_row = [[self._wall] for _i in range(self.width)]\n", + " else:\n", + " the_row = [[self._wall]]\n", + " the_row.extend([[self._wall] if np.random.randint(100) <= den else [self._space] for i in range(self.height - 2)])\n", + " the_row.append([self._wall])\n", + " self._map.append(the_row)\n", + "\n", + " def place(self, map_thing, to_row, to_col):\n", + " worked = True\n", + " if to_row <= 0 or to_row >= self.height:\n", + " worked = False\n", + " if to_col <= 0 or to_col >= self.width:\n", + " worked = False\n", + " if map_thing.mohs <= self._map[to_row][to_col][-1].mohs:\n", + " worked = False\n", + " if not worked:\n", + " return 'Bad Move'\n", + " self._map[to_row][to_col].append(map_thing)\n", + " map_thing.set_location(to_row, to_col)\n", + " return 'Moved'\n", + "\n", + " def rand_place(self, map_thing, tries=10):\n", + " result = ''\n", + " for _x in range(tries):\n", + " result = self.place(map_thing, np.random.randint(1, self.height -1), np.random.randint(1, self.width - 1))\n", + " if result == 'Moved':\n", + " return result\n", + " return result\n", + "\n", + "\n", + " def move(self, creature, from_row, from_col, move):\n", + " to_row = from_row\n", + " to_col = from_col\n", + "\n", + " if move == 'north' or move == 0:\n", + " to_row -= 1\n", + " elif move == 'south' or move == 1:\n", + " to_row += 1\n", + " elif move == 'west' or move == 2:\n", + " to_col -= 1\n", + " elif move == 'east' or move == 3:\n", + " to_col += 1\n", + " else:\n", + " return 'Unknown Move'\n", + " \n", + " place_result = self.place(creature, to_row, to_col)\n", + " if place_result == 'Moved':\n", + " self._map[from_row][from_col].remove(creature)\n", + " if creature.get_drop() != None:\n", + " self._map[from_row][from_col].append(creature.get_drop())\n", + " return place_result\n", + "\n", + " def move_creature(self, map_creature, move):\n", + " return self.move(map_creature, map_creature.row, map_creature.col, move)\n", + "\n", + " def print(self, map_thing=None, flashlight=5):\n", + " map_str = ''\n", + " for r in range(self.height):\n", + " if map_thing != None and (r < map_thing.row - flashlight or r > map_thing.row + flashlight):\n", + " map_str += self._fog.t_char * self.width\n", + " else:\n", + " for c in range(self.width):\n", + " if map_thing != None and (c < map_thing.col - flashlight or c > map_thing.col + flashlight):\n", + " map_str += self._fog.t_char\n", + " else:\n", + " map_str += self._map[r][c][-1].t_char\n", + " map_str += '\\n'\n", + " return map_str\n", "\n", - " self._wall = Map_thing('؅',10)\n", - " self._space = Map_thing(' ',0)\n", + " def __len__(self):\n", + " return self.width * self.height\n", + " \n", + " def __repr__(self):\n", + " return self.print()\n", "\n", - " self._map = []\n", + "class Game:\n", + " def __init__(self, size=(10, 10), level=0, player_controller=None, smart_controller=None):\n", + " self.level = level\n", + " self.map = Map(*size)\n", + " self.resets = 4\n", + " self.goal = Map_thing('@', 1)\n", + " self.player = Creature('#', 2)\n", + " self.player_controller = SimpleController(self.player, self.goal) if player_controller == None else player_controller\n", + " # self.player.setController(self.player_controller)\n", + " self.player_controller.setCreature(self.player)\n", + " self.controllers = [self.player_controller]\n", + " self.vampires = []\n", + " self.other_creatures = []\n", + " self.init_map()\n", + "\n", + "\n", + " def init_map(self):\n", + " self.turns_taken = 0\n", + " self.map.re_init_map()\n", + "\n", + " vamp_len = len(self.vampires)\n", + "\n", + " def no_print(message):\n", + " pass\n", + " \n", + " while len(self.vampires) < self.level:\n", + " vamp = Creature('V', 5, num_moves=2)\n", + " control = SimpleController(vamp, self.player, looker=no_print, responder=no_print)\n", + " self.controllers.append(control)\n", + " self.vampires.append(vamp)\n", + "\n", + " wrappings = Map_thing('W', 7)\n", + " for level in range(vamp_len, self.level):\n", + " if level != 0:\n", + " if level % 5 == 0:\n", + " mummy = Creature('M', 8, drop_thing=wrappings)\n", + " control = SimpleController(mummy, self.player, looker=no_print, responder=no_print)\n", + " self.controllers.append(control)\n", + " self.other_creatures.append(mummy)\n", + " if level % 10 == 0:\n", + " ghost = Creature('G', 11, wait_moves=5)\n", + " control = SimpleController(ghost, self.player, looker=no_print, responder=no_print)\n", + " self.controllers.append(control)\n", + " self.other_creatures.append(ghost)\n", + "\n", + " for other in self.other_creatures:\n", + " self.map.rand_place(other)\n", + " for v in self.vampires:\n", + " self.map.rand_place(v)\n", + " for c in self.other_creatures:\n", + " self.map.rand_place(c) \n", + " \n", + " self.map.rand_place(self.player)\n", + " self.map.rand_place(self.goal)\n", + "\n", + " def check_win(self):\n", + " win = self.player.row == self.goal.row and self.player.col == self.goal.col\n", + " if win:\n", + " self.level += 1\n", + " self.turns_taken = 0\n", + " return win\n", + "\n", + " def check_loss(self):\n", + " for c in self.vampires:\n", + " if self.player.row == c.row and self.player.col == c.col:\n", + " return True\n", + " for other in self.other_creatures:\n", + " if self.player.row == other.row and self.player.col == other.col:\n", + " return True\n", + " return False\n", + "\n", + " def broadcastMessage(self, message):\n", + " for controller in self.controllers:\n", + " controller.sendResponse(message)\n", + "\n", + " def run(self, turns=None):\n", + " turns = len(self.map) * 2 if turns == None else turns\n", + " player_wins = False\n", + " while self.turns_taken < turns:\n", + " self.turns_taken += 1\n", + " for controller in self.controllers:\n", + " map_info = self.map.print(map_thing=controller.getCreature())\n", + " controller.look(map_info)\n", + " if controller.canMove():\n", + " move = controller.getMove()\n", + " if move == 'reset' and self.resets > 0:\n", + " self.resets -= 1\n", + " controller.sendResponse(str(self.resets))\n", + " self.init_map()\n", + " break\n", + " if move == 'quit':\n", + " self.turns_taken = turns + 1\n", + " self.broadcastMessage('Quitting')\n", + " return 'Quitting'\n", + " move_result = self.map.move_creature(controller.getCreature(), move)\n", + " player_wins = self.check_win()\n", + " if player_wins:\n", + " self.broadcastMessage('Player leveled!')\n", + " self.init_map()\n", + " if self.check_loss():\n", + " self.broadcastMessage('Player lost!')\n", + " return 'Loss'\n", + " else:\n", + " controller.sendResponse(\"Can't move\")\n", + "\n", + " self.broadcastMessage('Too long')\n", + " return 'Too Long'\n", "\n", - " def _init_map(self, density=None):\n", - " den = density if density is not None else self.density\n", - " for col in range(self.width):\n", - " if col == 0 or col == self.width - 1:\n", - " self._map.append([self._wall] * self.height)\n", - " else:\n", - " column = [self._wall]\n", - " column.append([self._wall if np.random.randint(100) <= den else self._space for i in range(self.height - 2)])\n", - " column.append(self._wall)\n", - " self._map.append(column)\n", "\n", "\n", - " def _print(self):\n", - " map_str = ''\n", - " for i in range(self.width):\n", - " for j in range(self.height):\n", - " map_str += self._map[i][j].t_char\n", - " return map_str\n", "\n", "\n", "if __name__ == \"__main__\":\n", - " m = Map(10, 10, 50)\n", - " print(m._print())\n", - "\n", - " © 2020 GitHub, Inc.\n", - " Terms\n", - " Privacy\n", - " Security\n", - " Status\n", - " Help\n", - " Contact GitHub\n", - " Pricing\n", - " API\n", - " Training\n", - " Blog\n", - " About\n", + "\n", + " g = Game(level=11, size=(40, 40), player_controller=ConsoleController())\n", + " g.run()\n", + " print(g.map)\n", + "\n", + " \n", "\n" ], - "execution_count": null, - "outputs": [] + "execution_count": 29, + "outputs": [ + { + "output_type": "stream", + "text": [ + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V ██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "5\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V ██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "4\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "3\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "2\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "1\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "5\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "4\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "3\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "2\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "1\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "5\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "4\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "3\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "2\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "1\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "5\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "4\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "3\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >north\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "0\n", + "2\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "******************************* █ █\n", + "******************************* █ █ ██\n", + "*******************************█ ██\n", + "******************************* V██ █\n", + "******************************* █ ███ █\n", + "******************************* ██# █\n", + "*******************************█ █\n", + "*******************************█ █\n", + "******************************* █\n", + "******************************* ██ ██\n", + "******************************* █ ██\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "****************************************\n", + "\n", + "0\n", + "Your move >quit\n", + "Quitting\n", + "████████████████████████████████████████\n", + "██ █ █ █ █ █\n", + "███ █ █ ██ V█ ██ █\n", + "█ ██ ██ ██ ██ █ █ ██ ██ ██\n", + "█ █ █ █ █ ██ █ █\n", + "█ █ █V █ █V █ █ █ █\n", + "█ █ █ ██ ██ ███ █ █\n", + "██ █ █ █ █ █ █ W ██ @ █\n", + "█ █ █ █ █M █ █ █ █ █\n", + "█ █ ██ █ █ █\n", + "█ ██ █ ██ █ ██ █ ██ █\n", + "█ █ █ █ █ █ █\n", + "█ █ ██ █ ██ █\n", + "█ █ █ █ █ █ █V ██ ██ █\n", + "██ ██ ██ █ ██ █\n", + "█ █ ██ ██V█ █\n", + "██ █ █ ██M ██ █\n", + "█ █ █ █ ██ █ █\n", + "█ █ █ █ █ █ █ █\n", + "██ █ █ █ █ █ V██ █ █\n", + "█ WM█ █ █ █ █ █ █ V█ █\n", + "██ █ █ █ █ ██ █\n", + "█ █ █ █ M █ █ █ █\n", + "█ █ █ ██ █ █ █ ██\n", + "█ █ V█ █ █ ██\n", + "█ █ █ ███ ██ █ V██ █\n", + "█ █ █ █ ██ █ █ ███ █\n", + "█ ██ ██ ██ ██# █\n", + "██ █ █ █ █ ██ █ █\n", + "█ █ █ █ █ █ ██ █ █\n", + "█ █ G █ ██ █ ██ █\n", + "█ █ V██ █ V███ ██ ██\n", + "█ █ ██ █ █G █ █ ██\n", + "█ █ ████ █ █ █ ██\n", + "█ ██ █ █ ██ █ █\n", + "█ █ █ █ █\n", + "█ █ █ █ █ █\n", + "█ █ █ █\n", + "█ █ █ ██ █ █ █ █\n", + "████████████████████████████████████████\n", + "\n" + ], + "name": "stdout" + } + ] } ] } \ No newline at end of file