Researchers gave Ai a special keyboard linked to a computer when she was 18 months, a set-up that they used to study her memory and learning.

At five years old, Ai “mastered numerical naming from one to six and was able to name the number, colour and object of 300 types of samples”, according to a 1985 scientific paper by Tetsuro Matsuzawa, the primatologist behind the Ai Project.

When she was not participating in cognitive tests, Ai was known to enjoy drawing and painting. Like other chimpanzees at the centre, Ai would scrawl marker pens over blank paper without having to be motivated by food rewards.

Japanese media outlet Kyodo news reported that she once escaped with another primate – using a key to unlock her cage.

In 2000 she gave birth to a son, Ayumu, who is also known for his remarkable memory.

In 2017 – the 40th anniversary of the Ai Project – a scarf made from one of Ai’s paintings was gifted to renowned primatologist Dame Jane Goodall.