~/projects/setbot

SOFTWARE2023

SetBot

A Selenium bot that plays the card game Set on setwithfriends.com by reading card attributes from the page and automatically clicking valid sets.

TIMELINE
Oct 2023
TEAM
Solo
CONTEXT
Personal project
Twelve Set cards with the three cards of a valid set outlined in click order, next to the rule each attribute follows.

Overview

SetBot automatically plays setwithfriends.com, an online version of the card game Set. It drives a Chrome browser with Selenium, reads each visible card’s color, fill, shape, and number directly from the page’s SVG elements, and clicks together any valid set it finds.

Features

  • Launches and controls a Chrome session via a local chromedriver binary
  • Parses each card’s color, fill pattern, shape, and count from its SVG attributes
  • Computes the complementary third card for any pair of cards to check for a valid set
  • Clicks matched cards automatically through simulated DOM clicks
  • Detects and clicks “Play Again” when a round ends
  • Accepts the game URL to join as a command-line argument