// Braitenberg Vehicle: Alive

Ambient = getLight("center")

def normalize (v):
	if v > Ambient:
		v = Ambient

	return 1.0 - v/Ambient

def main():

	while True:
		L = getLight("center")
		forward(normalize(L))