UNPKG
nntsreinforcement
Version:
latest (1.0.1)
1.0.1
1.0.0
A Neural Network for Reinforcement Learning in TypeScript
nntsreinforcement
/
src
/
network
/
connection.ts
11 lines
(8 loc)
•
262 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
{
Neuron
}
from
"./neuron"
;
export
class
Connection
{
constructor
(
public
weight
:
number
=
1
,
public
prevNeuron
:
Neuron
,
public
nextNeuron
:
Neuron
){ }
getConnectionActivation
(
){
return
this
.
prevNeuron
.
activation
*
this
.
weight
; } }