This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARNING: [Loader Message] Code 0 : ReadDataFilesInRegistry: Registry lookup failed to get layer manifest files. | |
========== | |
VULKANINFO | |
========== | |
Vulkan Instance Version: 1.1.114 | |
Instance Extensions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARNING: [Loader Message] Code 0 : ReadDataFilesInRegistry: Registry lookup failed to get layer manifest files. | |
========== | |
VULKANINFO | |
========== | |
Vulkan Instance Version: 1.1.114 | |
Instance Extensions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
========== | |
VULKANINFO | |
========== | |
Vulkan Instance Version: 1.1.114 | |
Instance Extensions: | |
==================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We will be running multiple concurrent environment instances | |
instances = 16 | |
# Create a policy for each instance with a different distribution for epsilon | |
policy = [hk.policy.Greedy()] + [hk.policy.GaussianEpsGreedy(eps, 0.1) for eps in np.arange(0, 1, 1/(instances-1))] | |
# Create Advantage Actor-Critic agent | |
agent = hk.agent.A2C(model, actions=dummy_env.action_space.n, nsteps=2, instances=instances, policy=policy) | |
# Create simulation, train and then test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.layers import Dense | |
import huskarl as hk | |
import gym | |
# Setup gym environment | |
create_env = lambda: gym.make('CartPole-v0').unwrapped | |
dummy_env = create_env() | |
# Build a simple neural network with 3 fully connected layers as our model |