Question

We are developing a neural network for Checkers game. In our training data,

0 represents blank cell, 1 represents white piece, -1 represents white king, 2 represents black piece and -2 represents black king

So, what we need is an activation function withing range [-2, 2]. Which activation function should we use? Please give your suggestions regarding this.

Was it helpful?

Solution

I don't see reason why you couldn't use sigmoid function
Sigmoid function
Range of sigmoid function is [0, 1]
To modify sigmoid function to fit your needs, you can multiply it by 4, multiplying function by a constant affect it's amplitude ( Range = [0, 4] ),
and than subtract 2, with subtracting / adding you can move function on Y-axis ( Range = [-2, 2] )
So the function would look like this: S(t) = 4* ( 1 / (1 + e ^ (-t)) ) - 2

OTHER TIPS

Your state encoding is not optimal. Usually neural networks work better with 1-of-c encoding for categories. Then, it is easy to use sigmoid units. Just take the argmax of the 5 outputs to determine the state.

Yeah! sigmoid function works well since it neatly fits into the range you have specified. I also use it for a pattern recognition problem i am developing. Linear tends to work well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top