Should I use additional empty category in some categorical problems?

I try to create autonomous car using keyboard data so this is a multi class classification problem. I have keys W,A,S and D. So I have four categories. My model should decide what key should be pressed based on the screenshot (or some other data, I have some ideas). I have some API that I can use to capture keyboard data and screen (while gathering data) and also to simulate keyboard events (in autonomous mode when the car is driven by neural network).

Should I create another category called for example "NOKEY"? I will use sigmoid function on each output neuron (instead of using softmax on the all neurons) to have probabilities from 0 to one for each category. But I could have very low probabilities for each neuron. And it can mean either that no key should be pressed or that the network doesn't know what to do. So maybe I should just create additional "artificial" category? What is the standard way to deal with such situations?

• It is not fully clear what your problem is. What do you mean by "create autonomous car"? And how is this related to "keyboard data"? Are you a simulated environment?
– nbro
Oct 3, 2020 at 19:42
• I edited my question. My model should decide what key should be pressed based on the screenshot. I have some API that I can use capture keyboard data (while gathering data) and also to simulate keyboard events (in autonomous mode when the car is driven by neural network).
– user40943
Oct 5, 2020 at 21:34

In short: yes, you must allow "do nothing" decision as a first level result.

Your system must decide the action to be taken, including "do nothing" action. This is different to low network outputs, that can be translated as "don't know what to do".

In other words, the network can result in:

• "I don't know what to do now" when all results in the output have low probabilities. (Obviously, this is a bad network result, to be fixed as much as possible).
• "I know I must do nothing", when "do nothing" action has high probability, greater than the others.
• "I know I must do W", when "W" action has high probability, greater than the others.
• ...

Kind regards.

I know this is not a straight answer to your question, but I couldn't comment on your post so decided to post it (so maybe I will delete it after you received a better answer).

I think this playlist by sentdex can be handy as he goes through a lot of details to teach a neural network model that can drive cars in GTA-V by simply looking at each frame of the game. You can find the code of each step in this link.

• Yes, I know this series. I was inspired by this tutorial, but I have some ideas how to improve this. How to make even better cars than in this tutorial. I will see if I will be able to do this.
– user40943
Oct 12, 2020 at 18:05