Q-Learning Setup (State, Action)

Black Numbers / Lines → Dividing the images into 10 little states

First things first, lets make the states, since our original image have dimension of 10 * 100, lets divide the image into small squares (10*10) so we would have ten of them.

Modified Image from here

So our table for Q-Learning would look something like above. It would be an one-dimensional array with the index of the array being states and the values inside the array would be the threshold values. What this means is that we are going to have a threshold filter that only lets certain pixel intensity through and others will get filtered out.

Above we can see the hand crafted ground truth table, we can see that the index of number zero aligns where the image have black blocks. But we want to learn these threshold values, rather than hand crafting it. So lets first initialize our Q-Table like something below, with all ones.