Most challenging game: Just Ones

The hardest game I've ever made! Play now.

https://snap.berkeley.edu/snap/snap.html#present:Username=ten_6044&ProjectName=Just%20Ones%20Game

This is a game where you code to make a number. The code must follow the rules:

  1. You can only enter "1" in each input.
  2. Only +, −, ×, /, ^, and mod can be used.

Cool!
image
image

Can't you do it with 9566 + blocks? I bet you could write a metaprogram to generate such an expression!

An interesting test case for logic programming :slight_smile:

@calculator: 9567 can actually be constructed from 28 ones - no less! - using only addition and multiplication.

The above script will calculate the minimum number of “1”-s to be used. What I especially like is that the internal record of the underlying calculation is immediately translated into a Snap! -readable script.

I’m aware that finding the shortest calculation (i.e. with a little “1”-s as possible) including @ten_6044 ’s other operators (- / ^ mod) is very much more difficult - I don’t think I could pull it off, with target numbers even from 50 or so.

this reminds me of a thing i made where you represent any integer with two functions and one value: 2^x, x-y, and 0. for example, one way you could represent 5677 would be 2^(2^2^2^2^0-(2^2^2^0-(2^0)))-(2^(2^2^2^2^0-2^2^2^0)-(2^(2^2^2^2^0-(2^((2^2^2^0-2^0))-(2^2^2^0-2^0)))-(2^(2^2^2^2^0-(2^((2^2^2^0-2^0))-2^0))-(2^(2^((2^2^2^0-2^0))-2^2^0)-(2^(2^((2^2^2^0-2^0))-(2^2^2^0-(2^0)))-(2^2^2^2^0-(2^2^2^0-(2^0))))))))