Updated inputs of NN
This commit is contained in:
parent
3fb147afff
commit
be0485b2b9
1 changed files with 9 additions and 14 deletions
|
@ -115,13 +115,11 @@ class Player(pygame.sprite.Sprite):
|
||||||
]
|
]
|
||||||
|
|
||||||
self.state_features = [
|
self.state_features = [
|
||||||
self.rect.center[0],
|
# TODO: Find a way to normalize
|
||||||
self.rect.center[1],
|
# self.rect.center[0],
|
||||||
self.stats.health,
|
# self.rect.center[1],
|
||||||
self.stats.energy,
|
self.stats.health/self.stats.stats['health'],
|
||||||
self.stats.attack,
|
self.stats.energy/self.stats.stats['energy']
|
||||||
self.stats.magic,
|
|
||||||
self.stats.speed
|
|
||||||
]
|
]
|
||||||
|
|
||||||
enemy_states = []
|
enemy_states = []
|
||||||
|
@ -129,15 +127,12 @@ class Player(pygame.sprite.Sprite):
|
||||||
for distance, direction, enemy in sorted_distances[:5]:
|
for distance, direction, enemy in sorted_distances[:5]:
|
||||||
|
|
||||||
enemy_states.extend([
|
enemy_states.extend([
|
||||||
distance,
|
distance/sorted_distances[-1][1],
|
||||||
direction[0],
|
direction[0],
|
||||||
direction[1],
|
direction[1],
|
||||||
enemy.stats.health,
|
enemy.stats.health/enemy.stats.monster_info['health'],
|
||||||
enemy.stats.attack,
|
enemy.stats.attack/enemy.stats.monster_info['attack'],
|
||||||
enemy.stats.speed,
|
enemy.stats.exp/enemy.stats.monster_info['exp'],
|
||||||
enemy.stats.exp,
|
|
||||||
enemy.stats.attack_radius,
|
|
||||||
enemy.stats.notice_radius
|
|
||||||
])
|
])
|
||||||
|
|
||||||
self.state_features.extend(enemy_states)
|
self.state_features.extend(enemy_states)
|
||||||
|
|
Loading…
Reference in a new issue