Choose base algorithm