This 50-day internship project investigated using artificial intelligence to determine optimal moves in the board game Qwirkle, combining computer vision technologies with game logic algorithms.
Colour and shape detection
Rather than training Custom Vision to identify colour-shape combinations separately, the team used pixel analysis at bounding box centres, converting RGB values to HSV colour space for accurate colour determination independent of lighting conditions.
Custom Vision was trained on six shape categories using approximately 53 photos per classification, achieving reliable performance through variable-distance training samples.
Perspective correction and preprocessing
OpenCV handled perspective correction before Custom Vision analysis. The preprocessing pipeline included edge detection, contour analysis, and Hough line detection to orient game boards correctly for recognition.

Brute-force optimisation for maximum points
A brute-force algorithm evaluated all possible tile placements, scoring combinations based on Qwirkle's point system and identifying sequences yielding maximum points. The three-phase methodology, research, training, and implementation, demonstrated how Custom Vision API and OpenCV can work together for practical game-solving applications.



