Automatically generate problems