forked from Jugarov/DinoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NeuralNetwork.py
34 lines (23 loc) · 1005 Bytes
/
NeuralNetwork.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import numpy as np
class NeuralNetwork:
def __init__(self):
self.initialize()
def initialize(self):
# ======================== INITIALIZE NETWORK WEIGTHS AND BIASES =============================
pass
# ============================================================================================
def think():
# ======================== PROCESS INFORMATION SENSED TO ACT =============================
pass
# ========================================================================================
return self.act(result)
def act(self, output):
# ======================== USE THE ACTIVATION FUNCTION TO ACT =============================
pass
# =========================================================================================
if (action == 0):
return "JUMP"
elif (action == 1):
return "DUCK"
elif (action == 2):
return "RUN"