Constraint/tell neural network only certain outputs possible?

CurtiszCurtisz Member Posts: 4 Contributor I
edited February 2022 in Help
I am trying to build a supervised learning model that predicts the best move for a simplified game similar to tic-tac-toe (i.e. 3 in a row). I created a sample data set where I supplied the best move in form of the integer to play.  

Of course, only some outputs (unused spaces) are valid outputs.  Is it possible to "tell the NN" that only some outputs are valid in a given situation or constrain the output in some way?  Perhaps changing from regression to classification problem but it still doesn't solve that only some outputs should be valid for any given input (i.e. the free squares). 

I guess if one were to use this implementation in an "actual game" you could do a post-processing step where if the predicted move is invalid to default to a valid guess. Still, it feels like being able to provide constraints should be natural.

I do not think this is possible, in any regards.
Sign In or Register to comment.