From 09f4c0564b5eecf1c1f784b0da2a28da27c502be Mon Sep 17 00:00:00 2001 From: Quang Le Date: Wed, 18 Aug 2021 23:14:12 -0700 Subject: [PATCH] Delete file --- .DS_Store | Bin 6148 -> 6148 bytes __pycache__/runner.cpython-38.pyc | Bin 0 -> 16886 bytes __pycache__/runner_sample.cpython-38.pyc | Bin 0 -> 7990 bytes __pycache__/virtual_world.cpython-38.pyc | Bin 9010 -> 5540 bytes simple_virtual_world/.DS_Store | Bin 0 -> 6148 bytes simple_virtual_world/runner.py | 1 + simple_virtual_world/runner_sample.py | 332 ----------------------- simple_virtual_world/server.py | 8 +- simple_virtual_world/virtual_world.py | 8 +- 9 files changed, 11 insertions(+), 338 deletions(-) create mode 100644 __pycache__/runner.cpython-38.pyc create mode 100644 __pycache__/runner_sample.cpython-38.pyc create mode 100644 simple_virtual_world/.DS_Store delete mode 100644 simple_virtual_world/runner_sample.py diff --git a/.DS_Store b/.DS_Store index 3ea20b2365a2d73fbcc4a8cd1cd034b692b1d0e8..0ff2cc69e9abad0fe618f41aad7a029ea514c3f5 100644 GIT binary patch literal 6148 zcmeHKPixdb6o1pMI&l$mC|KxaE`oBN)a$fq9 zt(g%yNmPwKM9_y33?N*}wgXlHtHA%JfLyyxT&*GGaDr?1`}z$Jx#-7S#F!zshbQRw zz9_>8U;_$BVT?Sk*84H`CQ!l@YjCVrfxte8y2yIZ%|5`^cH;+j6@ZbQ8_KT(d3ovJ&VdwY~tra@NaPxzeopF=x#g}SsA6-V4}!r zGQgDAFVid$RaZ>2q)>GNJ>fVGbwYP*HoNa_?{2r4=XG}GEjH_P+Aa3@(awDC&^vd% zy~CsN$=liK{Op}l3kdFz%5EE6zSW6|pw{piE3y^rqj)Bff7 z$zSpF(dzGh985AUvLU|jLdPE@u;EGy7$s?QCAKA51*`&BSpm5}Fm#E&!CIr*I$>a8^Z(%Y_y3C|+p`K-1+J6=q|pm{UHl|-wk~~~JZl;H5xO*) oS8G%hY|L@20(lf~qASBWCIdv@V672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QzL~p2EZL;fHO&u}vRt|08H6b0@9}IaSCjJ;s!%nw!TT;!f@GXG?Js zx1GD7oU4~W;J0Bjg88XP=NZI3aJLkF45<+j<5!2+Muw8VZXb$G{Hs6~_b|>lwBCpr z8{l{DJUCFEHr?lbGNevNKF{+N?y*X3Y*# z^~08=(<*7Y$U&k$8?GVPP{ByErW&Hos;^>|EUaKiqC`Aw%%nP(WpZA?xLU{qN1wl8 NjK8V9sXaPg`(JajLp=Zh diff --git a/simple_virtual_world/.DS_Store b/simple_virtual_world/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..847bd5ead774aa9f1f80a83fd509a9a9c820c86d GIT binary patch literal 6148 zcmeHKyG{c!5S)b+iPBt2=`TRy53DFDsQG}95DKJ&LqLM){O2(1T@VK+1Pw%J_hgS> z-KRwp+8edH!J9)?+Mjj}@-D@0K(8{=ei;$WULqA9&p1ii`)YbVWZ)JfdU0#pYWc z_fh*;Qz#G$gaV{twq4)Nea-1BSjBGo(RPjxsX8%7=qgaUm94z1eg z{lDNZGZ^IeDNzdrLV0O(c&Y9G7T+srJ<=!KJ6+K6eYNz!l aEpuFUEQUIZwpTha9s*U6$U=c%P~ZiMCT?2* literal 0 HcmV?d00001 diff --git a/simple_virtual_world/runner.py b/simple_virtual_world/runner.py index ed175b0..ceffe5e 100644 --- a/simple_virtual_world/runner.py +++ b/simple_virtual_world/runner.py @@ -1,3 +1,4 @@ + from mesa import Agent, Model from mesa.space import MultiGrid import math diff --git a/simple_virtual_world/runner_sample.py b/simple_virtual_world/runner_sample.py deleted file mode 100644 index e9fc3d8..0000000 --- a/simple_virtual_world/runner_sample.py +++ /dev/null @@ -1,332 +0,0 @@ -from mesa import Agent, Model -from mesa.space import MultiGrid - - -class RunnerAgent(Agent): - ''' This class will represent runners in this model ''' - - def __init__(self, unique_id, model): - super().__init__(unique_id, model) - self.type = 'runner' - self.direction = None - self.count = 0 - self.distance_goal = 100 - self.want_to_go_home = True - # {(x,y):[(),(),(),..] - self.intersection_memory = {} - self.road_to_dead_end = [] - self.getting_out_of_deadend = False - self.state = '_continue_forward' - - def step(self): - - if self.state == '_continue_forward': - self.continue_forward() - elif self.state == '_intersection': - self.intersection() - elif self.state == '_corner_of_road': - self.corner_of_road() - elif self.state == '_dead_end': - self.dead_end() - elif self.state == '_decide_way_go_home': - self.decide_way_go_home() - - elif self.state == 'rest': - pass - - self.count += 1 - - if self.pos == self.init_position and self.count >= self.distance_goal: - self.state = 'rest' - print('FINISH') - - def continue_forward(self): - '''MOVING FORWARD''' - # Initially, start with no direction - if self.direction == None: - - # if start at a dead end, then runner memorize and set memory once get to intersection - if len(self._get_road_cell_around()) == 1: - self.getting_out_of_deadend = True - # if start at intersection, then create memory at that intersection - if len(self._get_road_cell_around()) > 2: - self.intersection_memory[self.pos] = [] - - next_position = self.random.choice(self._get_road_cell_around()) - - # check and update intersection memory just passed - if self.pos in self.intersection_memory: - self.intersection_memory[self.pos].append(next_position) - - self._set_new_direction_place_agent(next_position) - - # Already having a direction and have road ahead - elif self._get_road_cell_forward(): - next_position = self._get_road_cell_forward() - self._set_new_direction_place_agent(next_position) - - # CHANGE STATE IF NECESSARY - # facing trail, dead end - if len(self._get_road_cell_around()) == 1: - print('CHANGE STATE 1') - self.state = '_dead_end' - # at the corner of road - elif len(self._get_road_cell_around()) == 2 and self._get_road_cell_forward() == False: - print('CHANGE STATE 2') - self.state = '_corner_of_road' - # at the intersection and have to turn - elif len(self._get_road_cell_around()) > 2: - print('CHANGE STATE 3') - # key: intersection center cell - is not created yet - self._set_memory_at_intersection() - if self.count >= self.distance_goal: - print('FIND WAY HOME') - self.state = '_decide_way_go_home' - self.want_to_go_home = True - else: - self.state = '_intersection' - - def dead_end(self): - ''' make a U-turn since this type of runner avoids trail, also avoid dead end ''' - - next_position = self._get_road_cell_behind() - print('U TURN: ', next_position) - # let runner memorize this is dead end to store infor once getting to the intersection - self.getting_out_of_deadend = True - # set new direction and move agent - self._set_new_direction_place_agent(next_position) - # after making a U-turn, set state back to _continue_forward - self.state = '_continue_forward' - - def intersection(self): - ''' Prefer turn right, then left, if both roads have been gone, choose the one first used to enter this intersection to get out ''' - - # store the dead end road if on the way getting out of it - if self.getting_out_of_deadend: - self.road_to_dead_end.append(self._get_road_cell_behind()) - self.getting_out_of_deadend = False - - # CHOOSE PREFER ROAD: STRAIGHT, RIGHT, LEFT, THEN CHOOSE ONE FIRST USE TO ENTER INTERS. - if self._get_road_cell_forward() and self._get_road_cell_forward() not in self.intersection_memory[self.pos]: - next_position = self._get_road_cell_forward() - elif self._get_road_cell_right() and (self._get_road_cell_right() not in self.intersection_memory[self.pos]): - next_position = self._get_road_cell_right() - elif self._get_road_cell_left() and (self._get_road_cell_left() not in self.intersection_memory[self.pos]): - next_position = self._get_road_cell_left() - else: - next_position = self.intersection_memory[self.pos][0] - - # check and update intersection memory just passed - if next_position not in self.intersection_memory[self.pos]: - self.intersection_memory[self.pos].append(next_position) - - # set new direction and move agent - self._set_new_direction_place_agent(next_position) - # after making a turn, set state back to _continue_forward - self.state = '_continue_forward' - print(self.intersection_memory) - - def decide_way_go_home(self): - ''' Try to direct runner to home as close as possible ''' - # x, y = self.pos - - # Find prefer direction based on the 2 position (currrent and initial) - direction = self._check_direction_of_point( - self.pos, self.init_position) - road_cells = self._get_road_cell_around() - print('ROAD CELLS: ', road_cells) - prefer_roads = [] - - # append prefer road based on the direction toward init pos - if direction == 'up': - if self._get_cell('up') in road_cells: - prefer_roads.append(self._get_cell('up')) - elif direction == 'up_right': - if self._get_cell('up') in road_cells: - prefer_roads.append(self._get_cell('up')) - if self._get_cell('right') in road_cells: - prefer_roads.append(self._get_cell('right')) - elif direction == 'right': - if self._get_cell('right') in road_cells: - prefer_roads.append(self._get_cell('right')) - elif direction == 'down_right': - if self._get_cell('down') in road_cells: - prefer_roads.append(self._get_cell('down')) - if self._get_cell('right') in road_cells: - prefer_roads.append(self._get_cell('right')) - elif direction == 'down': - if self._get_cell('down') in road_cells: - prefer_roads.append(self._get_cell('down')) - elif direction == 'down_left': - if self._get_cell('down') in road_cells: - prefer_roads.append(self._get_cell('down')) - if self._get_cell('left') in road_cells: - prefer_roads.append(self._get_cell('left')) - elif direction == 'left': - if self._get_cell('left') in road_cells: - prefer_roads.append(self._get_cell('left')) - elif direction == 'up_left': - if self._get_cell('up') in road_cells: - prefer_roads.append(self._get_cell('up')) - if self._get_cell('left') in road_cells: - prefer_roads.append(self._get_cell('left')) - - # choose a road randomly from the prefer road, if don't have prefer road, choose one of the other non-prefer roads - # without considering roads leading to dead end - print(direction) - print('PREFER ROAD: ', prefer_roads) - - if len(self.road_to_dead_end) > 0: - for cell in self.road_to_dead_end: - if cell in prefer_roads: - prefer_roads.remove(cell) - if cell in road_cells: - road_cells.remove(cell) - - if len(prefer_roads) > 0: - next_position = self.random.choice(prefer_roads) - print('CHOOSE: ', next_position) - else: - next_position = self.random.choice(road_cells) - - # place agent, set new direction, change state - self._set_new_direction_place_agent(next_position) - self.state = '_continue_forward' - - def corner_of_road(self): - ''' Have to turn at the corner of road ''' - - possible_steps = self._get_road_cell_around() - possible_steps.remove(self._get_road_cell_behind()) - - next_position = possible_steps[0] - print(next_position) - # set new direction and move agent - self._set_new_direction_place_agent(next_position) - # after making a turn, set state back to _continue_forward - self.state = '_continue_forward' - - def _set_memory_at_intersection(self): - # create a key as the intersection center cell if it's created yet, then append road cell passed - if self.pos not in self.intersection_memory: - self.intersection_memory[self.pos] = [] - if self._get_road_cell_behind() not in self.intersection_memory[self.pos]: - self.intersection_memory[self.pos].append( - self._get_road_cell_behind()) - - def _set_new_direction_place_agent(self, next_pos): - # Unpack tuple position - x, y = self.pos - a, b = next_pos - # Set new direction - if a > x: - self.direction = 'right' - elif a < x: - self.direction = 'left' - elif b > y: - self.direction = 'up' - else: - self.direction = 'down' - # Place agent to new position - self.model.grid.move_agent(self, next_pos) - - def _get_road_cell_around(self): - # List contains position of 4 cells around (top, bottom, left, right) - cells_around = self.model.grid.get_neighborhood( - self.pos, moore=False, include_center=False) - # List contains position of road cells that are from those 4 cells above - possible_roads = [] - for pos in cells_around: - # x, y = pos - for cell_object in self.model.background_cells: - if cell_object.pos == pos and cell_object.type == 'road': - possible_roads.append(pos) - return possible_roads - - def _get_road_cell_behind(self): - if self.direction == 'right': - return (self.pos[0] - 1, self.pos[1]) - elif self.direction == 'left': - return (self.pos[0] + 1, self.pos[1]) - elif self.direction == 'up': - return (self.pos[0], self.pos[1] - 1) - elif self.direction == 'down': - return (self.pos[0], self.pos[1] + 1) - - def _get_road_cell_forward(self): - if self.direction == 'right' and self._check_cell_is_road((self.pos[0] + 1, self.pos[1])): - return (self.pos[0] + 1, self.pos[1]) - elif self.direction == 'left' and self._check_cell_is_road((self.pos[0] - 1, self.pos[1])): - return (self.pos[0] - 1, self.pos[1]) - elif self.direction == 'up' and self._check_cell_is_road((self.pos[0], self.pos[1] + 1)): - return (self.pos[0], self.pos[1] + 1) - elif self.direction == 'down' and self._check_cell_is_road((self.pos[0], self.pos[1] - 1)): - return (self.pos[0], self.pos[1] - 1) - else: - return False - - def _get_road_cell_right(self): - if self.direction == 'right' and self._check_cell_is_road((self.pos[0], self.pos[1] - 1)): - return (self.pos[0], self.pos[1] - 1) - elif self.direction == 'left' and self._check_cell_is_road((self.pos[0], self.pos[1] + 1)): - return (self.pos[0], self.pos[1] + 1) - elif self.direction == 'up' and self._check_cell_is_road((self.pos[0] + 1, self.pos[1])): - return (self.pos[0] + 1, self.pos[1]) - elif self.direction == 'down' and self._check_cell_is_road((self.pos[0] - 1, self.pos[1])): - return (self.pos[0] - 1, self.pos[1]) - else: - return False - - def _get_road_cell_left(self): - if self.direction == 'right' and self._check_cell_is_road((self.pos[0], self.pos[1] + 1)): - return (self.pos[0], self.pos[1] + 1) - elif self.direction == 'left' and self._check_cell_is_road((self.pos[0], self.pos[1] - 1)): - return (self.pos[0], self.pos[1] - 1) - elif self.direction == 'up' and self._check_cell_is_road((self.pos[0] - 1, self.pos[1])): - return (self.pos[0] - 1, self.pos[1]) - elif self.direction == 'down' and self._check_cell_is_road((self.pos[0] + 1, self.pos[1])): - return (self.pos[0] + 1, self.pos[1]) - else: - return False - - def _get_cell(self, type): - x, y = self.pos - if type == 'up': - return (x, y + 1) - elif type == 'down': - return (x, y - 1) - elif type == 'left': - return (x - 1, y) - elif type == 'right': - return (x + 1, y) - - def _check_cell_is_road(self, cell_position): - possible_roads = self._get_road_cell_around() - if cell_position in possible_roads: - return True - else: - return False - - def _check_direction_of_point(self, current_pos, init_position): - x, y = current_pos - a, b = init_position - - distance_x = a - x - distance_y = b - y - - if distance_y > 0 and distance_x == 0: - return 'up' - elif distance_y > 0 and distance_x > 0: - return 'up_right' - elif distance_y == 0 and distance_x > 0: - return 'right' - elif distance_y < 0 and distance_x > 0: - return 'down_right' - elif distance_y < 0 and distance_x == 0: - return 'down' - elif distance_y < 0 and distance_x < 0: - return 'down_left' - elif distance_y == 0 and distance_x < 0: - return 'left' - elif distance_y > 0 and distance_x < 0: - return 'up_left' diff --git a/simple_virtual_world/server.py b/simple_virtual_world/server.py index b6a1275..642cce7 100644 --- a/simple_virtual_world/server.py +++ b/simple_virtual_world/server.py @@ -21,11 +21,13 @@ def cell(agent): portrayal['Color'] = '#237308' elif agent.type == 'grass': portrayal['Color'] = '#4ECA24' -<<<<<<< Updated upstream + + +<< << << < Updated upstream elif agent.type == 'runner': -======= +== == == = elif agent.type == 'type1': ->>>>>>> Stashed changes +>>>>>> > Stashed changes portrayal['Shape'] = 'circle' portrayal['r'] = '0.7' portrayal['Layer'] = 1 diff --git a/simple_virtual_world/virtual_world.py b/simple_virtual_world/virtual_world.py index 35d268a..15ccada 100644 --- a/simple_virtual_world/virtual_world.py +++ b/simple_virtual_world/virtual_world.py @@ -342,12 +342,14 @@ def __init__(self, N, width, height): runner = RunnerAgent(i, self) # store the inital position as attribte runner.init_position = self.random.choice(self.roads) -<<<<<<< Updated upstream + + +<< << << < Updated upstream print('Initial position: ', runner.init_position) -======= +== == == = # runner.init_position = (46, 21) # print('Initial position: ', runner.init_position) ->>>>>>> Stashed changes +>>>>>> > Stashed changes self.grid.place_agent(runner, runner.init_position) self.schedule.add(runner)