From bd9fad4617679e03036ea4a5a45d157b77368245 Mon Sep 17 00:00:00 2001 From: Vasilis Valatsos Date: Fri, 22 Mar 2024 13:16:58 +0100 Subject: [PATCH] Readd complexity, only thing left is enemy hp --- config/game/monster_config.py | 24 ++++++++++++------------ ml/ppo/brain.py | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/game/monster_config.py b/config/game/monster_config.py index cfec1f0..2fd4751 100644 --- a/config/game/monster_config.py +++ b/config/game/monster_config.py @@ -2,40 +2,40 @@ monster_data = { 'squid': {'id': 1, 'health': 1, 'exp': 10, - 'attack': 0, + 'attack': 2, 'attack_type': 'slash', 'speed': 3, 'knockback': 20, - 'attack_radius': 1, - 'notice_radius': 1}, + 'attack_radius': 50, + 'notice_radius': 100}, 'raccoon': {'id': 2, 'health': 1, 'exp': 25, - 'attack': 0, + 'attack':5, 'attack_type': 'claw', 'speed': 2, 'knockback': 10, - 'attack_radius': 1, - 'notice_radius': 1}, + 'attack_radius': 50, + 'notice_radius': 80}, 'spirit': {'id': 3, 'health': 1, 'exp': 11, - 'attack': 0, + 'attack': 2, 'attack_type': 'thunder', 'speed': 4, 'knockback': 20, - 'attack_radius': 1, - 'notice_radius': 1}, + 'attack_radius': 50, + 'notice_radius': 120}, 'bamboo': {'id': 4, 'health': 1, 'exp': 9, - 'attack': 0, + 'attack': 1, 'attack_type': 'leaf_attack', 'speed': 3, 'knockback': 20, - 'attack_radius': 1, - 'notice_radius': 1} + 'attack_radius': 50, + 'notice_radius': 100} } diff --git a/ml/ppo/brain.py b/ml/ppo/brain.py index 75153da..d6a403a 100644 --- a/ml/ppo/brain.py +++ b/ml/ppo/brain.py @@ -52,7 +52,7 @@ class PPOMemory: class ActorNetwork(nn.Module): - def __init__(self, input_dim, output_dim, alpha, fc1_dims=1024, fc2_dims=1024, chkpt_dir='tmp'): + def __init__(self, input_dim, output_dim, alpha, fc1_dims=2048, fc2_dims=2048, chkpt_dir='tmp'): super(ActorNetwork, self).__init__() self.chkpt_dir = chkpt_dir @@ -92,7 +92,7 @@ class ActorNetwork(nn.Module): class CriticNetwork(nn.Module): - def __init__(self, input_dims, alpha, fc1_dims=4096, fc2_dims=4096, chkpt_dir='tmp'): + def __init__(self, input_dims, alpha, fc1_dims=8192, fc2_dims=8192, chkpt_dir='tmp'): super(CriticNetwork, self).__init__() self.chkpt_dir = chkpt_dir