Change peria AI algorithm