Google's self-driving cars are always learning, and this Halloween was no exception.

The company used the holiday to help improve its cars' ability to recognize children while they are wearing costumes.

Given that kids tend to be more unpredictable than adults, Google's cars are already programmed to be more cautious around children.

But the company said in a Google + update that the holiday provided some extra learning time for the vehicles to sharpen their skills at recognizing children who are in costume.

"This week, lots of little ghouls, superheroes, and even robots were running around Google with their families, so we asked them to hang out around our parked cars," Google said in the post. "This gives our sensors and software extra practice at recognizing children in all their unique shapes and sizes, even when they're in odd costumes."

Once a sensor detects a child, costumed or not, the software proceeds with extra caution, the company said.

Google's driverless cars have gotten pretty good at handling unpredictable situations. The company has driven its vehicles more than 1 million miles in autonomous mode and even has a dedicated team that imagines rare and odd situations so that the car can learn how to handle itself in even the most unusual circumstances.

Learn more about how Google's self-driving cars see and interpret the world.