It's pretty simple. The first 'question' where you pick the colour of the number limits the large selection down to a small handful. The 'house question' divides that small group into individual options. The other 'questions' are just to obfuscate this. The final 'door question' shows the number regardless of which door you pick first. It doesn't populate that field until you click. The other two doors get random other numbers afterwards.