I\'m currently making a tic-tac-toe program with AI and i\'m having a bit of a trouble translating this line of code (python) :
RANKS = dict([(4,3),
Although a "language equivalent" might me something like an std::unordered_map your use case may be more efficiently served with a straight array:
std::unordered_map
int RANKS[] = {2, 1, 2, 1, 3, 1, 2, 1, 2};