I'd like to make an AI learning how to play 2048 game. I decided to try a genetic algorithm, since I don't have any test examples of correct moves. So my AI should choose one from four possible moves (UP, DOWN, LEFT and RIGHT). I've previously done only a neural network (well, it's hard to call it a "network" actually, it only had one neuron) with two possible outputs, either 1 or 0. This time I'd need to have four. I've come up with an idea to make four output neurons, that instead of 0 or 1 would return a value between 0 and 1. Then I'd choose the neuron with the greatest value and make a corresponding move. Is it a good idea?
-
$\begingroup$ I just provided an answer to a similar question stats.stackexchange.com/questions/359515/…. $\endgroup$– Edv BeqJul 28, 2018 at 19:13
-
$\begingroup$ Well... to be honest I do not really see too much similarities between my question and the one that you answered. I'm just asking how to decide what move should my AI make. I can't choose more than one move at the same time. If I'd make four output neurons that would return 0 or 1, it is very likely that more than one neuron would return 1 or all the neurons would return 0 and I wouldn't be able to tell what move is the best. I have to somehow force that always only one neuron returns 1. $\endgroup$– MarasJul 28, 2018 at 19:41
-
$\begingroup$ A neural network can have as many inputs and outputs as you desire. The output of the network can be normalized with other functions such as softmax for example. Someone smarter than me can tell you more. $\endgroup$– Edv BeqJul 28, 2018 at 19:54
1 Answer
Yep, this is basically how multiple output networks work.