Back
Close
  • 1

Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.

Statement

“One away” is the most useful thing the New York Times’ word game Connections ever tells you. You were wrong — but by one tile, and one tile you can fix.

By the end of a puzzle the words stop helping anyway. You move a tile out, put another in, submit and see what comes back.

One Away is that part, start to finish. The four boxes in a group have something in common, but you only see it once you have found them.

  The Goal

Sixteen boxes are divided into four groups of four.

Find all four groups in as few turns as you can, using the hint given after each guess.

  Rules

The boxes are labelled 1 to 16. You are not told which boxes share a group.

The groups have no names and no order.

Each turn you guess a group of four boxes, and one hint comes back.

The hint

Your four boxes may come from several groups. Whichever group contributes the most decides the hint:
  • GREEN: all four from one group. The group is solved.
  • ORANGE: three from one group. The guess is one away.
  • GREY: otherwise, including the first turn.

The board

A solved group leaves play. Its four boxes join the solved rows at the top of the board, below the groups you found earlier.

The boxes still in play close the gaps left behind, staying in ascending order.

Where a box sits on the board tells you nothing about which group it is in.

Guesses

A guess is legal only if the four boxes are distinct and all still in play.

Repeating the same guess is allowed. It costs a turn and returns the same hint.

Score

Score = 140 − number of turns used when all four groups are found,
Score = 10 × solvedGroups otherwise.
The leaderboard ranks players in descending order of their score.
Victory Conditions
  • You find all four groups within 100 turns.
Defeat Conditions
  • You use all 100 turns without finding the four groups.
  • You make a guess which does not contain four distinct integers.
  • You make a guess containing a box number which is either outside the range 1 to 16, or from a group already solved.
  • You do not respond in time.

  Game Input

There is no initialization input. The whole board is sent at the start of every turn.
Input for one game turn

Line 1: an integer solvedGroups, the number of groups already solved.

Next 4 lines: the board, one row per line, each with four space-separated integers, the boxes in that row. The first solvedGroups rows are the solved groups, in the order they were solved. The rows below hold the boxes still in play, in ascending order.

Last line: a word hint, one of GREEN, ORANGE or GREY, for your previous guess, or GREY on the first turn.

Output for one game turn
A single line: four distinct box numbers, space-separated, in any order, all taken from the rows still in play.
Constraints
0 ≤ solvedGroups ≤ 3
Maximum 100 turns.

Response time per turn is 50ms.
Response time for the first turn is 1000ms.

All tests are fixed, while all validators are random.

A higher resolution is required to access the IDE