by 2097
Yes, it is possible to make such a program.Note that knowledge of the other player’s current score or even predicted end score (if they have any known irrational patterns of playing) can really help such an algorithm.
If you’re ahead you can play more solidly and if you’re behind you can play more riskily.