The rules of chaos