Chimpanzees can play rock-paper-scissors better than some children, researchers have found.

Scientists used a computer to teach seven chimps to play the hand game, first showing them the relationships between the objects — rock beats scissors, paper beats rock, scissors beat paper — and then putting them all together. They did the same for a few dozen children between about 3 years and 6 years old. According to their study in the journal Primates, the chimpanzees’ performance was about the same as that of a 4-year-old.

Read: How Evolution Made Chimps Stronger Than Humans

The game rock-paper-scissors is used as a transverse patterning task, a type of learning and memory experiment. There is a circular relationship, rather than a linear one, occurring between the three objects in the game, with the three possible matchups each delivering a different winner; a different correct choice. The fact that paper beats rock is an arbitrary rule, as are the relationships between the other pairs.

“Learning such transverse patterns requires enhanced mental capacity and it is useful when forming complex relationship networks, solving problems, or updating what you already know about a subject,” journal publisher Springer said in a statement.

Previous research has shown that children might be able to crack configuration-related problem solving, like transverse patterning tasks, around age 4.5 and this study backed up that idea, with 4 years old being the marker in the experiment for the human subjects to perform better. Beyond that, they got even better with age.

This study’s ultimate goal was to test “whether humans and chimpanzees are comparable in their ability to perform this task” and the authors noted that children had less difficulty learning the game than their chimp counterparts. The kids picked up everything faster in part because they were better able to control their choices while picking winners between the rock-paper-scissors pairs.

“The primary difference between the chimpanzees and children in the present study was the method of learning,” according to the study. “Children changed their choice immediately after they made a wrong one, whereas the chimpanzees would often take multiple sessions to correct themselves.”

Those kids might have been able to change their choices so quickly because they have more capacity to regulate their behavior and to overcome automatic responses, the study notes. That ability is called inhibitory control.

Read: Chimps Have Social Traditions Just Like Humans

Despite performing only at the same level as a 4-year-old human, chimps were able to learn the game regardless of their own age or sex. They had the most difficulty, however, learning the third pair in the series after getting the first two down cold.

“Even though it might take them longer, they are indeed able to learn the game as well as a young child,” Springer said.

The researchers hope to see future studies that further investigate how animals are able to learn circular relationships, including how age and sex plays a role in the species.