Procedurally generating rules to adapt difficulty for narrative puzzle games