Presentation on theme: "Artificial Intelligence of a Scrabble System"— Presentation transcript:
1 Artificial Intelligence of a Scrabble System Scrabble BotArtificial Intelligence of a Scrabble SystemIssa Araj Damien Espinola John Leehey Alex Lindt Karun Nagarajan Adam Rizkalla Kyle Williamson
2 TaskCreate a comprehensive Scrabble system for a human player to compete against an agent.Produce an Artificial Intelligence System that can determine possible words from a list of letters Develop an Open Source application easy for users to download and play
3 What is Scrabble? A trademark of Hasbro Inc. The game is based on forming word combinations from the selection of tiles in a players handEach tile has a point value and a players score is based on the combination of letters a user plays and any additional score modifiers from the boardAcceptable words are validated by dictionaries designed explicitly for Scrabble
4 Purpose Create a Scrabble agent to play against a human opponent Must be able to determine a word in a reasonable amount of timeThe bot will choose the best word point-wise with restrictions based on difficultyAgent must follow rules of ScrabbleWord ChoiceTake into account board layout & special tiles
5 Purpose Graphical User Interface Should be easy for a new player to learn and usePlaying should be intuitiveAesthetically appealingOther FunctionalityEasy for a user to download and install the gameAll words referenced against official Scrabble dictionary for correctness
6 Design : GUI > Interaction > Bot > RulesEngine The GUI receives interaction from the user, and in turn probes the bot for moves. The Bot contains the AI, and uses base functions from the RulesEngine to determine the rules it must follow.RulesEngineContains the basic functions that determine whether a move follows the rulesExample: is [word] a valid word in the dictionary?Example: what is the score of [word]?Uses the SOWPODS standard scrabble dictionary
7 Implementation Board Graphical Structure building GUI Internal Representation of BoardPlayer generation of a handfinding the played wordPass board to bot K
8 Program Flow Board appears / updates on screen Player moves (places tiles on board)GUI registers moveGUI class probes bot for next moveBot calculates (using brute force) best possible moveBot sends to GUIGUI registers on screenRepeat from step 2 (Player's turn to move)If no more tiles or space, game ends
9 Computer Bot Intelligence Checks occupied squares on the boardFinds various word combinations with given tilesChecks if moves are validRanks valid moves based on word length and score
10 Improving the Algorithm Two big options: DAWG or GADDAG.DAWG: directed acyclic word graphGADDAG: bi-directional acyclic word graphBoth offer trade offs for time and spaceEach is significantly more powerful than brute force methods
11 DAWG (Big D) DAWG: each node can have a child node, or a next node. child: an appended letter.next: an alternate letter.Pros: low space requirement, reasonably fast, eliminates invalid words from even being considered. Cons: doesn't do well in multiple directions, treats prefixes differently than suffixes.
12 GADDAG (Double D) GADDAG: bi-directional acyclic word graph Pros: (when optimized) extremely fast, eliminates invalid words from even being considered.Cons: storing the optimized data structure is ~5x bigger than the DAWG.Very similar in form to the DAWG, but treats prefixes and suffixes in the same way.Increased performance allows more time to make better moves.
13 General ImprovementsBalance use of vowels, consonants, and letters required for larger moves.Predict opponent's hands based on what's on the board.Avoid moves that make large bonus tiles easy to reach.