Task 2: Boggle Buddy The game of Boggle is normally played on a 4x4 grid. 16 dice, each…
- User
Task 2: Boggle Buddy
The game of Boggle is normally played on a 4x4 grid. 16 dice, each die printed with six characters from the letters A to Z, are placed in a closed container and the container is shaken. The dice land in the 4x4 grid and the letter on the top face is the letter for that grid square. A three-minute timer is typically started and players try and make as many words from the letters on the grid as they can before time runs out. These words have to follow certain rules - for this task we will assume the rules followed are:
Each letter (except for the first letter) must be adjacent (horizontally, vertically or diagonally) to its preceding letter. A grid square's letter can only be used once (if there are two copies of the same letter appearing in different grid squares - both can be used). The word must be one of the allowed words.Though there are additional rules when played as a group of players, but points are assigned for the total number of letters in all valid words made. Part A (Code)
A regular board-game playing group have invited some tourists to play and brought Boggle. The tourists wanted to try playing but were not confident in their foreign language skills and were worried the words they'd make might not be valid for play. The group asked online if anyone would be willing to put together a system to quickly retrieve all valid words so that the tourists can quickly check the list to see that they did not make a mistake. Part B (Code)
Hooked on the board game, the tourists purchased a copy and brought it home as a souvenir. Their children wanted to play the game with their parents, but because they are still practicing the language, they sometimes get stuck trying to find a word. Seeing a good opportunity for their children to practice a foreign language, the parents reached out again to see if anyone could put together a tool that gives a hint for the next letter that can be played to make a word. Part C (Written)
The parents notice the program often takes time to think of solutions, but only on boggle games where the same letter appears lots of times. Given the sand timer for thinking of words gives such a short time, they ask if there's a way to speed it up, for example, if each letter can only be used once in each word (even if it appears more than once on the board). How might their rule modification change the worst case complexity of finding all words? Part D (Code)
Hearing that the improvement might be promising, they ask you to put together the tool giving all valid words with the added rule. Give an answer for part C, showing all mathematical working out. you must write the answer in latex overleaf notation
- Assistant