Automatic algorithm design and configuration