Is it possible to use the algorithms in the C++ source code? This too seems too challenging I maybe continue my project with python...
yes, it is possible, no need to rewrite in Python.
Go step by step. Try different algorithms The most simple would be the computer putting the dice (?) at random position. A slightly more complicated one would be to put the positions in the opposite position of your position. A more tactical strategy might be to always put the dice next to your dice.