knitr::opts_chunk$set(echo = TRUE)
require(woRdleSolveR)
Class based so to solve a puzzle just set an initial status. For an example will use wordle with solution of ROBIN that is unknown to player.
gametosolve <- woRdle() # S3 object so can plot to see status plot(gametosolve)
Generate an initial guess - this is same every time unless wordlist changes.
algo_guess_v1(gametosolve)
With no information AROSE seems best option. Most frequent letters in most frequent places.
If compare AROSE to the unknown solution ROBIN will see that response would get is Grey, Yellow, Yellow, Grey, Grey. Can now update the game with this response and plot again.
gametosolve <- updatewoRdle(gametosolve, guess = woRdleGuess("AROSE", "0YY00")) plot(gametosolve)
Generate a new guess based on current game status.
algo_guess_v1(gametosolve)
Now YOURN is the best option. Most frequent letters in most frequent places for possible workds.
If compare YOURN to the unknown solution ROBIN will see that response would get is Grey, Green, Grey, Yellow, Green. Can now update the game with this response and plot again.
gametosolve <- updatewoRdle(gametosolve, guess = woRdleGuess("YOURN", "0G0YG")) plot(gametosolve)
Generate a new guess based on current game status.
algo_guess_v1(gametosolve)
The solution has been found.
Can update the game with this response and plot again if interested.
gametosolve <- updatewoRdle(gametosolve, guess = woRdleGuess("ROBIN", "GGGGG")) plot(gametosolve)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.