Exemplo n.º 1
0
def play():
	print("\n ----- Playing the game -----\n")

	GRID_SIZE = 16
	LOCAL_GRID_SIZE = 15 # for printing out the state

	MAP_NUMBER = 4
	# MAP_NUMBER = np.random.randint(5)
	# MAP_PATH = "./Maps/Grid{}/map{}.txt".format(GRID_SIZE, MAP_NUMBER)
	# MAP_PATH = None
	MAP_PATH = "./Maps/Grid{}/impossible_map{}.txt".format(GRID_SIZE, MAP_NUMBER)

	env = Environment(wrap = False, 
					  grid_size = GRID_SIZE, 
					  local_size = LOCAL_GRID_SIZE,
					  rate = 100,
					  food_count = 0,
					  stick_count = 0,
					  obstacle_count = 0,
					  lava_count = 0,
					  zombie_count = 0,
					  history = 100,
					  action_space = 5,
					  map_path = MAP_PATH)

	env.play()
def play():

    print()
    print("PLAYING THE MINECRAFT SIMULATION")
    print()

    GRID_SIZE = 7
    LOCAL_GRID_SIZE = 9  # Has to be an odd number (I think...)
    SEED = 1
    WRAP = False
    FOOD_COUNT = 1
    OBSTACLE_COUNT = 0
    # MAP_PATH = "./Maps/Grid{}/map2.txt".format(GRID_SIZE)
    MAP_PATH = None

    env = Environment(wrap=WRAP,
                      grid_size=GRID_SIZE,
                      rate=100,
                      food_count=FOOD_COUNT,
                      obstacle_count=OBSTACLE_COUNT,
                      lava_count=0,
                      zombie_count=0,
                      action_space=5,
                      map_path=MAP_PATH)

    env.play()
def play():
    print("\n ----- Playing the game -----\n")

    GRID_SIZE = 16

    MAP_PATH = "./Maps/Grid{}/map4.txt".format(GRID_SIZE)
    # MAP_PATH = None

    env = Environment(wrap=False,
                      grid_size=GRID_SIZE,
                      rate=100,
                      food_count=13,
                      obstacle_count=0,
                      lava_count=0,
                      zombie_count=0,
                      action_space=5,
                      map_path=MAP_PATH)

    env.play()