The circuit which compares the two voltages is:

Comparator

Logic gate

LDR

Sensor