See query.
I could teach a tame chicken to peck at a light (not search for a specific light, that would take longer) in about ten minutes, depending on the chicken. It’s not a hard task. For one thing, they peck at things to find out what they are. You reward when they peck at a light. Pretty soon they peck and look for the treat. Simple.
That’s how they taught chickens to “play” tic-tac-toe in those arcade games that were popular in the 70s. The chicken didn’t actually select an X or an O when it was the bird’s “turn.” A computer inside the machine turned on a light and the chicken was trained to peck a button in response for a reward. The computer would display the X or O in response to the human’s move.