Graph-inspired implementation of Hex game AI