semi-algorithms