Posts for Tag: game

Snake on a Globe

Posted In: Fun | Game | Geography
Snake on a Globe

Navigate the globe to the specified cities eating as many apples as you can

I coded a unique twist on the classic snake game, Snake on a Globe, where your mission is to eat as many apples as you can when given their location and find the best ways to navigate the globe.

The game includes the largest cities in the world and tests your geographical knowledge about country and city locations. Your challenge is to move to the next apple and city in the most efficient manner, moving only along lines of longitude or latitude. But remember you are on a sphere so you can move around the globe in any of four directions: over the poles and east and west.

Instructions

  • Use the arrow keys (or WASD or IJKL) to move up, down, left and right along the lines of longitude and latitude to try to get to the named city.
  • The score increases for each apple you eat and there are extra bonus points for the largest cities. For each apple you eat, your body gets longer
  • The game calculates the least number of steps to move between one apple and the next and your score will start to decline once you exceed this number of steps. The game will remind you that your score is going down because it will be shown in red.
  • The game ends when your score goes to zero (i.e. you took too long to eat an apple) or if you collide with your own body. One caveat is that you can cross over the poles without hitting your own body if you are on a different line of longitude.
  • See how many apples you can eat and whether you can get a high score.
  • Sources and Tools:
    The list of cities and their population is from Simplemaps. The game is coded with Three Globe and Three.js, 3D javascript libraries in javascript and HTML and CSS.

    Snake on a Globe game

    NYT Digits Solver

    Posted In: Game
    NYT Digits game solver

    You can play new daily Digits puzzles

    Calculate the solution to any digits puzzle

    This tool lets you view all of the potential solutions to a Digits puzzle. Enter the goal number and the five starting numbers separated by a comma like “1,2,3,4,5” and hit the “Calculate Solutions” button to see all of the possible solutions to the puzzle. The list is likely quite long so you’ll probably need to scroll through all of the solutions in the list.

    There is also a checkbox that lets you remove transpositions, which are operations that occur in different orders but the same set of operations are used to achieve the final number. For example, where the first two operations appear in reverse order and then are added together in the 3rd operation to hit the target.
    e.g. these two solutions are an example of a transposition.
    5 + 10 = 15 15 / 3 = 5 5 * 20 = 100
    vs
    15 / 3 = 5 5 + 10 = 15 5 * 20 = 100

    Tools
    A version of the solution code is written in Python code and is used to generate the puzzles. This code is re-written in javascript so it is solved inside the browser and the visuals are made with javascript, CSS and HTML and the graphs are made using the open source Plotly javascript graphing library.

    digits nytimes game solver

    NY Times Digits Archive

    Posted In: Fun | Game | Math
    You can also play new daily Digits puzzles and try out the Digits Solver

    Now play all old Engaging Data Digits puzzles plus 120 archived Digits puzzles from the New York Times

    You can still play the NYT Digits Game

    Missing the NYT Digits game? You can still play (or replay) the old puzzles here.

    On August 8th, 2023, the New York Times ended the beta for their Digits math game and the game is no longer playable. The game ran from April 10th to August 8th and there were 120 different daily puzzles during that time.

    Twitter user @Digits_Analysis had compiled a list of each of the five daily puzzles during that entire time period (600 puzzles total) and generously provided them to me. Since I already coded up a Digits replacement with daily puzzles, I figured I could adapt that code fairly easily to make a version where you could play old puzzles. The first 120 puzzles are the original NY Times puzzles and subsequent puzzles are the collection of new daily puzzles.

    Rules

    The rules for Digits are relatively simple just like in the NYT version. Each day’s puzzle has 5 individual puzzles to complete. Every puzzle has a target number and 6 individual starting numbers that you must use in mathematical calculations to try and create the target number. Each of the 6 numbers can only be used once but the answer to a given math calculation becomes a new number to use.

    Once you finish one puzzle, you can use the tabs at the top to move to another puzzle.

    Scoring

    You get up to 3 stars for each puzzle:
    3 stars if you match the target
    2 stars if your number is within 10 of the target
    1 star if your number is within 25 of the target

    Other

    Auto-Advance – Click on the gear to toggle on and off “auto-advance”. When enabled, the game will cue up the next puzzle if you hit the target.

    Chainmode – Click on the gear to toggle on and off “chainmode”. When enabled, it will automatically highlight the answer from the previous calculation to be the first number in the new calculation.

    Share – Share your Digits stars on social media using the share button, which will copy your results to your clipboard. It will share a link to the specific puzzle you are on.

    # button – clicking the # button lets you see the total number of possible solutions as well as the fewest and most operations that can yield a solution. This can bring an extra element of challenge to the game. See if you can achieve the shortest solution and then try again to achieve the longest solution. Clicking on the buttons reveals one of the solutions that have the fewest and most number of operations.

    Tracking your plays – Digits archive will keep track of your stars for all of 120 daily puzzles. Given that there are 120 old Digits puzzles to play, it may take folks many days, weeks or even months to go through these puzzles. One issue is that on the Safari browser on Macs and iOS devices, the data storage used to track your progress through these puzzles may be deleted if you don’t play the game for 7 days. The browser does this for privacy concerns. Just be aware that your data could be deleted by the browser if you are using Safari and don’t play at least once for 7 straight days. This shouldn’t be a problem for other browsers.

    Hopefully you’ll find this enjoy playing the old NYTimes Digits math game and find it a fun and interesting way to improve your mathematical thinking. Let me know if you find any bugs or have any suggestions.

    Tools
    Python code was used to generate the puzzles and the game play and visuals were created in javascript, CSS and HTML. The New York Times Digits puzzle data was obtained from @Digits_Analysis

    digits nytimes game

    Digits Game NYT – A Daily Math Puzzle

    Posted In: Game | Math
    Digits NYT game from engaging data
    You can now play past NYT Digits puzzles at the Digits Archive and use the Digits Solver
    Press the # symbol to see the solutions.

    Please share Digits with your friends, family, colleagues, math teachers, students and anyone else you think might enjoy this math puzzle game

    It’s great to hear from all the folks who have taken the time to play Digits and let me know. I’m glad that so many people are enjoying it.

    You can still play the NYT Digits Game

    Missing the NYT Digits game? You can still play it here.

    On August 8th, 2023, the New York Times ended the beta for their Digits math game and the game is no longer playable. About a week prior to that, a friend asked me to create a clone of Digits so he and his daughter could keep playing together. I had never played before but tried it out. Not surprisingly, since I like games, puzzles and math, I found it to be quite fun. I’m always looking out for interesting things to make, so I figured it would be a fun challenge. I’d previously made some variants of the popular Wordle Game: Wordguessr, Tridle and Scrabwordle.

    Rules

    The rules for Digits are relatively simple just like in the NYT version. Each day you are given 5 puzzles to complete. Every puzzle has a target number and 6 individual starting numbers that you must use in mathematical calculations to try and create the target number. Each of the 6 numbers can only be used once but the answer to a given math calculation becomes a new number to use.

    Once you finish one puzzle, you can use the tabs at the top to move to another puzzle.

    Scoring

    You get up to 3 stars for each puzzle:
    3 stars if you match the target
    2 stars if your number is within 10 of the target
    1 star if your number is within 25 of the target

    Other

    Auto-Advance – Click on the gear to toggle on and off “auto-advance”. When enabled, the game will cue up the next puzzle if you hit the target.

    Chainmode – Click on the gear to toggle on and off “chainmode”. When enabled, it will automatically highlight the answer from the previous calculation to be the first number in the new calculation.

    Share – Share your Digits stars on social media using the share button, which will copy your results to your clipboard.

    # button – clicking the # button lets you see the total number of possible solutions as well as the fewest and most operations that can yield a solution. This can bring an extra element of challenge to the game. See if you can achieve the shortest solution and then try again to achieve the longest solution. Clicking on the buttons reveals one of the solutions that have the fewest and most number of operations.

    Hopefully you’ll find this replacement to the NYTimes Digits math game a fun and interesting game and improve your mathematical thinking. Let me know if you find any bugs or have any suggestions.

    Why did the New York Times discontinue Digits?

    I’m guessing it wasn’t as popular as some of their other games. Wordle and the crossword puzzle are probably the most popular. And they seem to be pushing their new game Connections as a sort of replacement for Digits. But alot of folks like math games so it’s a bit of a shame that they discontinued it, especially since it’s simple to learn how to play but can be challenging to get the solution each time.

    Tools
    Python code was used to generate the puzzles and the game play and visuals were created in javascript, CSS and HTML.

    digits nytimes game

    Wordle Stats – How Hard is Today’s Wordle?

    Posted In: Fun | Game

    Update: Added a histogram below main graph to view the difficulty of today’s puzzle in context of historical data (compared to a number of previous puzzles)

    What is today’s Wordle difficulty?

    NY Times’ Wordle is a game of highs and lows. Sometimes your guesses are lucky (I mean, highly skilled) and you can solve the puzzle easily and sometimes you barely get it in 6 guesses. When the latter happens, sometimes you want validation that that day’s puzzle was hard. This dataviz lets you see how difficult today’s wordle puzzle was for other NY Times Wordle players did.

    The graph shows the distribution of guesses needed to solve today’s Wordle puzzle, rounded to the nearest whole percent. It also colors the most common number of guesses to solve the puzzle in green and calculates the average number of guesses. “NS” stands for Not Solved. The lower histogram provides some context for how difficult the day’s puzzle is compared to many other puzzles in the past based on average number of guesses needed to solve the puzzle. It doesn’t include the entire history of wordle, but a subset of days that I was able to gather data on.

    Even over 1 year later, I still enjoy playing Wordle. I even made a few Wordle games myself – WordguessrTridleScrabwordle. I’ve been enjoying the Wordlebot which does a daily analysis of your game. I especially enjoy how it indicates how “lucky” your guesses were and how they eliminated possible answers until you arrive at the puzzle solution. One thing it also provides is data on the frequency of guesses that are made which provides information on the number of guesses it took to solve each puzzle.

    Instructions

  • Click on the eye to get the answer to the day’s puzzle.
  • Select “Hard Mode” from the dropdown menu in order to see the statistics for hard mode
  • Data and Tools
    The data comes from playing NY Times Wordle game and using their Wordlebot. Python is used to extract the data and wrangle the data into a clean format. Visualization was done in javascript and specifically the plotly visualization library.

    wordle daily guess distribution

    ScrabWordle

    Posted In: Fun | Game

    Also try WordGuessr and Tridle


    What is ScrabWordle? Wordle with a Scrabble twist

    ScrabWordle is a game based on the hugely popular Wordle by Josh Wardle, where you try to solve a 5-letter puzzle. The Scrabble element of the game comes in where the point value of the target word is given based on the letter values in the game and is another helpful clue to help solve the puzzle.

    I recently made WordGuessr and Tridle. So I’d already made the structure of the game and just needed to add the Scrabble elements. And it took me a little while to work out all the kinks and it also improved my CSS skills to get all the aspects of the look of the tiles correct.

    How to Play ScrabWordle

    If you know how to play Wordle, then the rules are the same:
    1) the game reports the point value of the target word
    2) just type in a guess and and press ‘Enter’, the score of your guess is updated in real time
    3) the game will indicate how good your guess was. If any letter are in their correct position they will turn green, if they are correct but in the wrong place, they turn orange, and if they don’t show up in the word they turn black.
    4) guess again, using the clues from the previous word
    5) you can share your results with other folks or issue a challenge game
    6) play all you want

    The game is created using HTML, CSS and Javascript code to create interactivity and UI. Hope you enjoy it. I enjoy the extra element (word point values) to help me guess the word. Let me know in the comments how you like the new game play and if the difficulty levels are appropriate.

    scrabwordle scrabble wordle