From 60ef927a7fc741fd8dbeba0e5377a9a74a88c0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?micha=C5=82?= Date: Wed, 23 Mar 2016 00:37:02 +0100 Subject: [PATCH] Changed cig_bots.py mode to PLAYER and it runs freaking fast. Former-commit-id: 362d3342626c84206ec9eb622515d503b8746bbc --- examples/python/cig_bots.py | 4 ++-- examples/python/min.py | 23 ----------------------- 2 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 examples/python/min.py diff --git a/examples/python/cig_bots.py b/examples/python/cig_bots.py index 3bdb42252..76e767459 100755 --- a/examples/python/cig_bots.py +++ b/examples/python/cig_bots.py @@ -4,7 +4,7 @@ from vizdoom import * from random import choice -game = Game() +game = DoomGame() game.set_vizdoom_path("../../bin/vizdoom") @@ -26,7 +26,7 @@ game.add_game_args("+name AI"); # Multiplayer requires the use of asynchronous modes but -game.set_mode(Mode.SPECTATOR) +game.set_mode(Mode.PLAYER) # game.set_window_visible(false) diff --git a/examples/python/min.py b/examples/python/min.py deleted file mode 100644 index aa88c75af..000000000 --- a/examples/python/min.py +++ /dev/null @@ -1,23 +0,0 @@ -from vizdoom import * -import random -import time - -game = DoomGame() -game.load_config("../config/basic.cfg") -game.init() - -shoot = [0,0,1] -left = [1,0,0] -right = [0,1,0] -actions = [shoot, left, right] - -episodes = 10 -for i in range(episodes): - game.new_episode() - while not game.is_episode_finished(): - state = game.get_state() - img = state.image_buffer - misc = state.game_variables - reward = game.make_action(random.choice(actions)) - time.sleep(0.028) - print "Result:", game.get_summary_reward() \ No newline at end of file