Giter Site home page Giter Site logo

donkirkby / vograbulary Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 2.0 42.68 MB

A collection of word games that will add words to your vocabulary (grab them)

Home Page: https://donkirkby.github.io/vograbulary

License: MIT License

Java 90.51% Shell 0.11% HTML 0.56% CSS 3.01% Python 5.38% TeX 0.44%
puzzle anagrams games word-game

vograbulary's Introduction

Grab a few new words for your vocabulary.

Word Games

This app and web site will eventually have several word games like anagrams, word ladders, and Quizl. The current games are listed below. Players will be able to complete these challenges alone or with a timer, against other players, or against the computer.

Ultraghost

On each turn, you are given a three letter puzzle, like CIP. You have to find a word that starts with the first letter, contains the middle letter, and ends with the last letter. For example, CRISP starts with C, contains I, and ends with P. Once you enter your answer, your opponent has a few seconds to enter a better one. An answer is better if it is shorter, or if it is the same length and comes earlier in the dictionary. For example CLIP is shorter than CRISP. The app will then give you a hint if there are any better words that you didn't think of. For example, CHIP is earlier than CLIP in the dictionary.

If you'd like a few practice puzzles, try GHS, ORG, EOS. Scroll down for my answers.

Anagrams

Reveal random letters, then try to make words with them. Steal your opponents words by making anagrams of them, or by adding one or more new letters.

Russian Dolls

So far, this is a solitaire challenge based on an episode of Ask Me Another. Each puzzle gives a clue with two words highlighted. One of those words gets put completely inside the other to make the solution word. The letters in each word don't get rearranged, one complete word gets nested inside the other like two Russian dolls. Here's an example puzzle:

When you are unable to find comfort.

The two words are "unable" and "comfort". Scroll down for the answer.

When you think you've solved the puzzle, drag the pointer over the place where one word should be inserted into the other. Press the Solve button to check your answer. If you got it right, it will display the combined word. Press the Next button to see the next puzzle.

Bacronyms

Another solitaire challenge: this time, each puzzle shows three words. One of them is a bacronym: when you reverse the letters, it spells a different word. Click on the bacronym to solve the puzzle.

Answers

My answers for the Ultraghost puzzles from good, to better, to best:

  • GHS - gushes, ghosts, gashes
  • ORG - ordering, offering, orating
  • EOS - errors, eons, egos

The answer to the Russian Dolls puzzle is "uncomfortable", "comfort" nests inside "unable" to form "uncomfortable".

Running Vograbulary

You can try the app in a few ways:

As well as the word challenges, the app will include tools to measure current vocabulary size by testing sample words in an exponential distribution from a word list sorted by usage frequency. For more accurate measurement, the testing will zoom in on the estimated upper limit of the student's vocabulary.

Once approximate vocabulary size is known, it can be expanded by drilling new words with spaced-repetition flashcards.

Vograbulary will include definitions for the words, brief readings from public domain works, plus links to the complete works for further reading.

Contributing

Want to make Vograbulary better? There are many ways to help.

License

Vograbulary is released under the MIT license.

Hamcrest is released under the BSD 3-Clause License.

Mockito is released under the MIT license, and libgdx is released under the Apache 2.0 license.

Natural Language Toolkit is released by the NLTK project under the Apache 2.0 license.

Open Iconic icons are released under the MIT license.

vograbulary's People

Contributors

donkirkby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vograbulary's Issues

Review state machine

The way I've implemented the state has been difficult to maintain. Try drawing a state transition diagram to see if it can be simplified, or move some of the responsibility out of the state classes.
Maybe an enter() method on the state would be easier to think about.

  • Puzzle class to pass state to the view
  • Different button for each state
  • Controller changes
  • Get enter key to work again

Word check: neglig

It's in the Ubuntu dictionary, but I can't find a definition anywhere.
Missing word: seine.

Support more than two students

Edit a list of students, select some of them before starting a word challenge. Let Ultraghost run with more than two students.

Menu screen mockup

Scroll lists of students

Currently, you can fit about five students on the Ultraghost screen, and six or seven on the main menu.

  • scroll on Ultraghost screen
  • scroll on menu

Cursor still isn't right

When it's the human's turn to challenge the computer, the cursor is put in the solution field instead of the challenge field.
In human vs. human, the next button leaves the cursor in the solution field.

Hyperghost: use letters of midrange frequency

XQV is not fun because there are too few solutions. DES is not fun because there are too many solutions. This is particularly noticeable in Hyperghost when it can take a whole game to exhaust a common set of letters.
The simplest option is to add two random integers: [0,12] + [0, 13] => [0, 25] and use that as the index into the list of letters sorted by frequency.
Another option is to use something similar to the current system, but add two random floats together where we currently use one to walk up the odds table. The odds table would need to be sorted by frequency.
Another option is to work this into a catch-up mechanism. Generate n+2k completely random puzzles, where n is the number of players, and k is an arbitrary integer - maybe 2 or 3. Then scan the word list for matches to each puzzle, and calculate a difficulty rating for each puzzle where more matches and more common words all lower the difficulty rating. Sort the players by their score, but add some noise so they aren't guaranteed to be in exactly the correct order. Throw away the top k and the bottom k puzzles, then assign the puzzles in order of difficulty to the sorted players. The most difficult puzzle will usually go to the leading player.

  • choose a technique for generating letters
  • implement it
  • track the puzzles in a match, and don't repeat them - maybe track the last 100 puzzles

Add timer to Russian Dolls challenge

Android

  • Score drops with timer.
  • Add each puzzle's score to total.
  • After 10 seconds, show handles for dragging each word through the other.
  • Solve puzzle with dragging.
  • Hide insertion pointer when dragging starts.

HTML

  • Score drops with timer.
  • Add each puzzle's score to total.
  • After 10 seconds, show handles for dragging each word through the other.
  • Solve puzzle with dragging.
  • Hide insertion pointer when dragging starts.

mock up

Migrate to PlayN

I'm finding libgdx frustrating, and upgrading to the new version of libgdx in issue #33 completely stalled.
The PlayN framework looks like it is similar to libgdx, so I'm going to try migrating to it. I found a library of utilities and two tutorials.

  • Create a trivial example app using PlayN.
  • Create a main menu stub with a button for each challenge, plus a stub for each challenge screen with a back button.
  • Try the dragging effect that wouldn't work on the Russian Dolls challenge.
  • Create issues to migrate each of the challenges and get Jester running again.

Take turns in Ultraghost

  • Display whose turn it is.
  • Let user type answer or challenge.
  • Keep score, and play to 10. Valid word scores 3, unless beaten by same length (2) or shorter (1). Invalid word scores 0. Give up to score 1 if no one has a valid word or -1 if someone does. Challenge scores 2 if no one has a valid word or -2 if someone does, but leave challenges out of scope for this issue.

Ultraghost letter distribution

Completely random letter selection generates a lot of puzzles with no solutions. There are very few words that end with the letter J, for example.

Try setting the odds of selecting each letter based on how often it appears in the word list. Use separate odds for starting, interior, and ending letters.

New word challenge: Hyperghost

A variant of Ultraghost where students keep using the same three letter puzzle until they can't think of any more solutions. On each turn, the active student must provide a new solution that is worse than the previous solution. If any other student can think of another solution worse than the previous solution but better than the current solution, they reduce the active student's score.
Example:
Alice's puzzle is PIE.
Alice's solution is PINE.
Bob's response is PILE (2 points for Alice).

Bob's puzzle is PIE after PINE.
Bob's solution is PIECE.
Alice has no response (3 points for Bob).

Alice's puzzle is PIE after PIECE.
Alice's solution is PRICE.
Bob has no response (3 points for Alice).

Bob's puzzle is PIE after PRICE.
Bob's solution is PRAISE.
Alice's response is PRIDE (1 point for Bob).

This keeps going through longer and longer words, ending with PERSISTENCE, PRECIPITATE, and PREVARICATE.

Alice's puzzle is PIE after PREVARICATE.
Bob has no solution.
Alice has no response.

Since both skipped, the next puzzle uses three new letters with no lower limit.

Generate docs

Doxygen? Include diagrams.
Helps contributors get started.

Use model classes for Russian dolls

Android:

  • Add reference to vograbulary project, and load puzzles.
  • Wire activity into controller, and display puzzles.
  • Send solution to controller, and navigate to next puzzle.

HTML

  • Add reference to vograbulary project, and load puzzles.
  • Wire view class into controller, and display puzzles.
  • Send solution to controller, and navigate to next puzzle.

Drag an arrow left and right

  • First remove the libgdx libraries from the core library so it can safely be referenced from the other projects.

Then use that library to do the same thing in both projects.

Android

  • Display two target words side by side.
  • Display an insertion arrow above them.
  • Drag the arrow left and right.
  • Display the word and character index when you drag.

HTML

  • Display two target words side by side.
  • Display an insertion arrow above them.
  • Drag the arrow left and right.
  • Display the word and character index when you drag.

Anagrams challenge

Add a challenge with the traditional Anagrams rules. The logic is already written on a branch of the Movable Type repo.

Russian dolls can't be resized

Open the first puzzle, and while the score is dropping, resize the window.
The solve button stops working.
It seems to only be a problem with the desktop Java version.

Russian dolls challenge

Add a challenge that gives you a pair of words, and you have to insert one whole word inside the other to make a third word. From an episode of Ask Me Another.

  • Display completely static clues, button moves to next puzzle, never shows answer.
  • Display target words separately.
  • Move triangle to insertion point and press solve button to check answer.

Here's the screen mock up (timer and drag handles will be another issue):

mock up

Create minimal GWT project

This is just to get started with the migration to native UI code.

  • Start a new HTML project with none of the libgdx dependencies.
  • Add in the Russian dolls file and display the first puzzle.
  • Add buttons to navigate through the list of puzzles.

Student names on native platforms

Part of issue #40.

Android

  • Figure out local storage.
  • Edit list of students, including delete.
  • Select which will be in challenge.
  • Include Computer as an option.
  • Replace You vs. Computer button with Hyperghost button.
  • Display previous word in Hyperghost.

HTML

  • Figure out local storage and JSON.
  • Edit list of students, including delete.
  • Select which will be in challenge.
  • Include Computer as an option.
  • Replace You vs. Computer button with Hyperghost button.
  • Display previous word in Hyperghost.

Ultraghost: find solution slowly

Take about 60 seconds to search the full list of words, and display the best found so far when user clicks next.

  • Search in timer events.
  • Search from common words to rare words.

Migrate Ultraghost to PlayN

I think Hyperghost should also work with no problem.
This issue just includes single player against the computer.

Computer solves old puzzle

To reproduce, start human vs. computer. On computer's turn, hit the menu button immediately, and then start human vs. computer again. If you do it within 10 seconds, the computer will enter a solution to the old puzzle.

Fix the ugly font

Try using a filter to scale up the font without making it look quite so bad. Maybe start with a bigger font using the Heiro tool.

Ultraghost: display solution

When you click the next button once, display the best solution found so far. Click the button again to display a new set of three letters.

Migrate to native Android and GWT

Libgdx is frustrating and the new release was difficult to set up.

PlayN has limited documentation and no support for native fields.

Maybe it's time to try native Android and GWT to support my two primary targets. Another option is to rewrite in Python with QPython on Android and Skulpt in the browser.

There will be several smaller issues to make up this big transition, as well as a few miscellaneous tasks.

  • #41 Create a native branch and minimal Android project
  • #42 Create minimal GWT project
  • #43 Drag an arrow left and right
  • #44 Use model classes for Russian Dolls
  • #45 Create separate screens
  • #47 Migrate Ultraghost to native platforms
  • #48 Student names on native platforms
  • option for minimum number of letters in Ultraghost
  • option for vocabulary size of computer student
  • enter key in Ultraghost
  • enter key on physical keyboard in response
  • enter key in solution after computer student challenge
  • monospace fonts for solution, response, and hint
  • bigger fonts

I created a sample project to try out the techniques for targeting the native platforms, as well as to document all the alternative platforms I've tried with this project.

Ladder challenge

Add a challenge that gives you a pair of words and you have to build a ladder of words between them by changing one letter at a time.

Ultraghost layout

Take up most of the screen with the letters and the next button. Make it look reasonable with centring or something.

New challenge: Bacronyms

Show one bacronym and two barconyms, student(s) have to pick the bacronym.
A bacronym is kind of like a palindrome, but it's a different word when you reverse the letters. For example, DEER becomes REED.
A barconym is almost a word when reversed, two letters are swapped. For example, DEAR becomes RAED, which is almost READ.

  • HTML version
  • Android version

Challenge: Ultraghost

Add Ultraghost as a word challenge. It is described in David Parlett's book, Botticelli and Beyond. It is very similar to the the Four Second Word Game that was part of Catchword, but the three letters have to be the first letter, a middle letter, and the final letter of the answer.
For the first implementation, just display three random letters. No score keeping, no dictionary checks.

Create a native branch and minimal Android project

This is just to get started with the migration to native UI code.

  • Create a native branch.
  • Start a new project with none of the libgdx dependencies.
  • Add in the Russian dolls file and display the first puzzle.
  • Add buttons to navigate through the list of puzzles.

Improve how student names are edited

It's not clear how to get to the edit screen, and the back button can lose changes. Also upgrade GWT so we can use JSON to structure preferences.

Decide what to do with invalid word

In Ultraghost, should an invalid word just end your turn? It doesn't feel right.
Option 1: do nothing, you still have to enter a valid word or skip your turn.
Option 2: lose one point, and you still have to enter a valid word or skip your turn.
Option 3: combination of 1 and 2, you get 3 invalid words per game before you start losing points.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.