The prisoners dilemma is ultimately just a demonstration of game theory.
That is there is more than you win/I lose or I win/you lose but there is win/win.
It’s definately conceivable two algorithms or two ai would be capable of concluding the same. In fact it may be even easier because what’s the actual dilemma/self interest of such a system without the selfishness of human nature?