{"id":16528408,"url":"https://github.com/danvk/performance-boggle","last_synced_at":"2025-07-07T00:38:46.134Z","repository":{"id":54258585,"uuid":"665848","full_name":"danvk/performance-boggle","owner":"danvk","description":"An attempt to find the highest-scoring Boggle board and prove that I've found it.","archived":false,"fork":false,"pushed_at":"2021-03-01T03:35:39.000Z","size":1887,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T18:54:20.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.danvk.org/wp/category/boggle/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danvk.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-05-14T04:09:54.000Z","updated_at":"2023-07-07T14:42:04.000Z","dependencies_parsed_at":"2022-08-13T10:10:53.278Z","dependency_job_id":null,"html_url":"https://github.com/danvk/performance-boggle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danvk/performance-boggle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Fperformance-boggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Fperformance-boggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Fperformance-boggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Fperformance-boggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danvk","download_url":"https://codeload.github.com/danvk/performance-boggle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Fperformance-boggle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263995287,"owners_count":23541361,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T17:40:17.137Z","updated_at":"2025-07-07T00:38:46.127Z","avatar_url":"https://github.com/danvk.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository provides some libraries and binaries for scoring boggle boards.\nThe emphasis is on performance, both in terms of implementation details and\nalgorithmic advances.\n\nThe most notable achievement of this code to date is finding the highest\nscoring 3x3 boggle board and proving that it is optimal in a few hours on a\nsingle machine.\n\nBest boards:\n3x3:  545 streaedlp (exhaustive search -- proven)\n3x4: 1651 sindlatepers (simulated annealing)\n4x4: 3625 perslatgsineters (simulated annealing)\n\n\nOpen problems are 3x4 and 4x4 boggle.\n\nTo get started:\n$ git clone git://github.com/danvk/performance-boggle.git\n$ cd performance-boggle\n\nBasic checks:\n$ make clean\n$ make test\n./trie_test: All tests passed!\n./4x4/boggler_test: All tests passed!\n./3x3/boggler_test: All tests passed!\n./3x3/ibuckets_test: All tests passed!\n./board-utils_test: All tests passed!\n./4x4/ibuckets_test: All tests passed!\n\n$ make perf\n./4x4/perf_test\nLoaded 172203 words into 385272-node Trie\nTrie contains 273917 childless nodes, 60848 words w/ children\nTotal score: 22925120 = 105.977811 pts/bd\nScore hash: 0x000C1D3D\nEvaluated 216320 boards in 2.433583 seconds = 88889.509057 bds/sec\n./4x4/perf_test: All tests passed!\n\nWhat the binaries do:\n\nsolve:\n  Reads in boards, prints out scores.\n\n  $ echo \"catdlinemaropets\" | ./solve --dictionary words\n  catdlinemaropets: 2338\n\n\nneighbors:\n  Read in boards, print all other boards w/in an edit distance of N.\n  One \"edit\" is either a die swap or changing a letter in one square.\n\n  $ echo \"catdlinemaropets\" | ./neighbors -d 2 | wc -l\n  267205\n\n  $ echo \"catdlinemaropets\" | ./neighbors -d 2 | sort -u | wc -l\n  122532\n\n  $ echo \"abcdefghijklmnop\" | ./neighbors -d 2 | sort -u | ./solve | sort -k2 -nr | head -1\n  abcderghisklmnop: 201\n\n\nrandom_boards:\n  Print out a bunch of random boards.\n\n  $ ./random_boards -n 10000 | ./solve | sort -k2 -nr | head -1\n  bqphumsroteilstq: 445\n\n\nanneal:\n  Do simulated annealing to find a high-scoring board.\n\n  $ ./anneal --max_stall 2000\n  ...\n  final board: plessiagrtnrseed\n  final score: 2960\n\n\nbucket_boggle:\n  Bucket letters into classes and forms a new dictionary by reducing the\n  letter space. Reports the fraction of boards from a sample that can be\n  eliminated (i.e. have an upper bound on their score less than 3625) using\n  the given bucketing.\n\n  $ ./bucket_boggle words 100000 ab cd ef gh ij kl mn op rs tu vw xy z\n  Loaded 162848 words.\n  207 / 99793\n  ab cd ef gh ij kl mn op rs tu vw xy z : 0.99793\n\n  That means that 99.793% of boards (in normal board space) can be eliminated\n  by using this bucketing. The 100,000 is the number of boards to test.\n\n\nibucket_boggle:\n  Calculate an upper-bound on the highest score in a class of boards using\n  \"implicit buckets\", i.e. without forming a new, bucketed dictionary.\n\n  Takes a board where each cell is a class of letters. Reports the upper\n  bound, the time it took to compute it and the number of boards represented\n  in this class.\n\n  This can sometimes eliminate a stupendous number of boards very quickly,\n  e.g. the example below eliminates ~50 billion boards/sec.\n\n  $ all=abcdefghijklmnopqrstuvwxyz\n  $ ./ibucket_boggle $all b $all j $all jkx g $all h i $all jkx jkx jkx jkx $all\n  Score: 3111\n  1.481485 secs elapsed\n  Details:\n   num_reps: 75066533568 = 75.066534B\n   sum_union: 71079\n   max_nomark: 7465\n   max+one: 3111 (force cell 10)\n\n\nibucket_breaker:\n  Start with a random bucketed board (ala ibucket_boggle) created by setting\n  each cell to one of a few letter patterns (usually 4). Compute an upper\n  bound in the same way as ibucket_boggle. If it's \u003c 3625, we're done. Entire\n  class eliminated. If not, break one of the cells into its constituent\n  letters and calculate upper bounds for each of those boards. Repeat until\n  the entire board class has been \"broken\".\n\n  One can imagine that, with the right classes of letters, this might be an\n  effective way to \"solve boggle\".\n\n  $ ./ibucket_breaker words\n  ...\n  1612431360000 reps in 703.99 s @ depth 8 = 2290433843.342557 bds/sec:\n  sy aeiou chlnrt bdfgjkmpvwxz aeiou sy bdfgjkmpvwxz aeiou bdfgjkmpvwxz bdfgjkmpvwxz bdfgjkmpvwxz chlnrt sy aeiou chlnrt chlnrt\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanvk%2Fperformance-boggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanvk%2Fperformance-boggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanvk%2Fperformance-boggle/lists"}