Measuring ancient technological complexity and its cognitive implications using Petri nets