Inspiration

A twist on the classic game 'WikiRacer', but better! Players play Wikiracer by navigating from one Wikipedia page to another with the fewest clicks. WikiChess adds layers of turn-based strategy, a dual-win condition, and semantic similarity guesswork that introduces varying playstyles/adaptability in a way that is similar to chess. It introduces strategic elements where players can choose to play defensively or offensively—misleading opponents or outsmarting them. Victory can be achieved through both extensive general knowledge and understanding your opponent's tactics.

How to Play

Setup: Click your chess piece to reveal your WikiWord—a secret word only you should know. Remember it well! Game Play: Each turn, you can choose to either PLAY or GUESS.

PLAY Mode:

  • You will start on a randomly selected Wikipedia page.
  • Your goal is to navigate to your WikiWord's page by clicking hyperlinks.
    • For example, if your WikiWord is "BANANA," your goal is to reach the "Banana" Wikipedia article.
  • You can click up to three hyperlinks per turn.
  • After each click, you'll see a semantic similarity score indicating how close the current page's title is to your WikiWord.
  • You can view the last ten articles you clicked, along with their semantic scores, by holding the TAB key.
  • Be quick—if you run out of time, your turn is skipped!

GUESS Mode:

  • Attempt to guess your opponent’s WikiWord. You have three guesses per turn.
  • Each guess provides a semantic similarity score to guide your future guesses.
  • Use the article history and semantic scores shown when holding TAB to deduce your opponent's target word based on their navigation path. Example: If your opponent’s target is "BANANA," they might navigate through articles like "Central America" > "Plantains" > "Tropical Fruit." Pay attention to their clicks and semantic scores to infer their WikiWord.

Let's talk strategy!

Navigate Wisely in PLAY Mode!

  • Your navigation path's semantic similarity indicates how closely related each page's title is to your WikiWord. Use this to your advantage by advancing towards your target without being too predictable. Balance your moves between progress and deception to keep your opponent guessing.

Leverage the Tug-of-War Dynamic:

  • Since both players share the same Wikipedia path, the article you end on affects your opponent's starting point in their next PLAY turn. Choose your final article wisely—landing on a less useful page can disrupt your opponent's strategy and force them to consider guessing instead.
    • However, if you choose a dead end, your opponent may choose to GUESS and skip their PLAY turn—you’ll be forced to keep playing the article you tried to give them!

Semantic Similarity: May Not Be the Edge You Think It Is

  • Semantic similarity measures how closely related the page's title is to your target WikiWord, not how straightforward it is to navigate to; use this to make strategic moves that might seem less direct semantically, but can be advantageous to navigate through.

To Advance or To Mislead?

  • It's tempting to sprint towards your WikiWord, but consider taking detours that maintain a high semantic score but obscure your ultimate destination. This can mislead your opponent and buy you time to plan your next moves.

Adapt to Your Opponent:

  • Pay close attention to your opponent's navigation path and semantic scores. This information can offer valuable clues about their WikiWord and inform your GUESS strategy. Be ready to shift your tactics if their path becomes more apparent.

Use GUESS Mode Strategically:

  • If you're stuck or suspect you know your opponent’s WikiWord, use GUESS mode to gain an advantage. Your guesses provide semantic feedback, helping refine your strategy and closing in on their target.
    • Choosing GUESS also automatically skips your PLAY turn and forces your opponent to click more links. You can get even more semantic feedback from this, however it may also be risky—the more PLAY moves you give them, the more likely they are to eventually navigate to their own WikiWord.

How we built it

Several technologies and strategies were used to develop WikiChess. First, we used web scraping to fetch and clean Wikipedia content while bypassing iframes issues, allowing players to navigate and interact with real-time data from the site. To manage the game's state and progression, we updated game status based on each hyperlink click and used Flask for our framework. We incorporated semantic analysis using spaCy to calculate NLPsimilarity scores between articles to display to players. The game setup is coded with Python, featuring five categories—animals, sports, foods, professions, and sciences—generating two words from the same category to provide a cohesive and engaging experience. Players start from a page outside the common category to add an extra challenge. For the front end, we prioritized a user-friendly and interactive design, focusing on a minimalist aesthetic with dynamic animations and many smooth transitions. Front-end techstack was made up of HTML/CSS, JS, image generation tools, Figma.

Challenges we ran into

One of our biggest challenges was dealing with iframe access controls. We faced persistent issues with blocked access, which prevented us from executing any logic beyond simply displaying the Wikipedia content. Despite trying various methods to bypass this limitation, including using proxy servers, the frequent need to check for user victories made it clear that iframes were not a viable solution. This challenge forced us to pivot from our initial plan of handling much of the game logic on the client side using JavaScript. Instead, we had to rely heavily on backend solutions, particularly web scraping, to manage and update game state.

Accomplishments that we're proud of

Despite the unexpected shift in our solution approach, which significantly increased the complexity of our backend and required major design adjustments, we managed to overcome several challenges. Integrating web scraping with real-time game updates and ensuring a smooth user experience were particularly demanding. We tackled these issues by strengthening our backend logic and refining the frontend to enhance user engagement. Despite the text-heavy nature of the Wikipedia content, we aimed to make the interface visually appealing and fun, ensuring a seamless and enjoyable user experience.

What we learned

As beginners in hacking, we are incredibly proud of our perseverance through these challenges. The experience was a great learning opportunity, and we successfully delivered a product that we find both enjoyable and educational. Everyone was able to contribute in their own way!

What's next for WikiChess

Our first priority would be to implement an online lobby feature that would allow users to play virtually with their friends rather than only locally in person. We would also like to introduce more word categories, and to have a more customized metric than semantics for the similarity score. Ideally, the similarity score would account for the structure of Wikipedia and the strategies that WikiRacers use to reach their target article other than just by going with the closest in word meaning. We would also like to introduce a timer-based gameplay where players would be limited to time instead of turns to encourage a faster-paced game mode.

Share this project:

Updates