1 of 12

BLOKUS

Team A1: Blokus

Nadine Bao, Jonathan Nee, Aria Zhang

2 of 12

Application Area and Solution Approach

  • Implement socially-distanced game of Blokus
  • Support up to 4 players per game
  • Create game sessions
  • Game play mechanics:
    • Place pieces down on your own board
    • Piece tracked using camera and CV
    • Relayed to opponents through web server
    • See opponents’ physical board light up based on your move via LEDs
  • Only allow valid moves
  • Ability to resume game at a later time

3 of 12

System Overview

4 of 12

Complete Solution

  • Public Demo
    • Multiplayer gameplay
      • Live camera feed of game
        • LED board state
        • OpenGL game
      • 4-player game play, 3 controlled �using computer

5 of 12

Complete Solution

  • Introduce hardware and software setup
  • Video Demo
    • Gameplay
      • Simulate 2-players playing the game using physical boards
      • 4-player game play

6 of 12

Metrics - High Level User Requirements

Name

Req.

Measurement

Description

End to end latency

150ms

CV: 82ms (60-120ms)

Server: 28ms (23-37ms)

Arduino: 23ms (10-40ms)

Total: ~133ms

End to end latency from piece placed to LED being lit

Avg time of individual components

Additional delay due to sending cell by cell, could send all at once

Accuracy

100%

20/20 tests passed

Accuracy of piece placed on one board to LED lighting up on opponent board, including invalid moves

Measured from one board to lighting up on board with LEDs

7 of 12

Metrics - Computer Vision

Name

Requirement

Measurement

Description

Color + Coordinate Identification Video Test

100% pass

20/20 tests

Given reasonable lighting conditions, identification of correct pieces in correct cells by CV

Placed a piece down, and measured if correct coordinates were output in software

Validity of Moves

100% pass

20/20 tests

Given piece placed, local client to determine validity

Placed a piece down, and measured if software correctly responded to valid/invalid move

8 of 12

Metrics - Client Software + Server

Name

Requirement

Measurement

Description

Client 1 to Server to Client 2

< 40 ms

Average: 28.3 ms

Max: 37.4 ms

Min: 23.5 ms

Sending messages from client to server to client (200 trials)

Valid move verification

< 1 ms

Average: 0.047 ms

Max: 0.073 ms

Min: 0.035 ms

Timing when GUI received mouse input to displaying on screen

(100 trials)

9 of 12

Metrics - Arduino + LEDs

Name

Requirement

Measurement

Description

Arduino Code Execution Time

<1ms

~.78 ms

10 timed code execution

Time necessary to:

  1. Parse row, col, color
  2. Calculate LED index
  3. Determine RGB values

Accurate LEDs Behavior

100% pass

20/20 visual tests passed

Expected color and coordinates of each piece

Given a color and coordinate, to light up that respective LED that color

10 of 12

Trade-offs

  • CV image resizing
    • Immediate time sink vs. long term sink when looping through image
  • Website vs. OpenGL
    • Accessibility
    • Latency
  • LED board construction
    • Budget vs. Time: hand-drilling holes per square
    • Outsourcing construction (ex. PCB, 3D-printing)

11 of 12

Project Management

12 of 12

Lessons Learned

  • Unexpected issues can arise during integration
    • Start testing on different platforms early (Windows)
  • Have backup components (LEDs and RPis)
  • Sacrifice some latency for easier to use libraries and more compatible technologies
  • It is great to plan for contingencies, but diving in and actually testing things out is also very important