I am trying to design a novel number system for a game.
To do this, I want to create a mapping from a set S of symbols to the integers, where not all sequences of symbols from S are allowed, but they can all map onto the natural numbers according to one rule.
I want to start with one such number system and see if the user can carry out addition and multiplication in the game using the game number system mechanics (this would be the scope and the fun of the game).
However, in order to do this, I would have to start with one specific set of symbols and mapping and start playing, before development, to see how the rules go.
I wonder whether anyone can come up with such an implementation.
This is, something that can be managed as a game on a mobile phone, but may require some writing to figure the rules out.
So, while there are many instances, I am looking for some (perhaps optimal) suggestions.
One could map the symbols, carry out the operations in the space of the usually represented natural numbers, and then take the inverse (to retrieve the original symbol), but in the game one would have to carry out everything in the original number system representation (and the rules would have to be given in the interface).
A 3D visualization approach might be to place all cross products of symbols, sequences of length 1 of symbols followed by all sequences of length 2 followed by all sequences of length 3, on the z-axis, with sequences growing on the x-axis, and an x on the z-axis to indicate that the sequence is allowed, and an arrow to the Arabic numeral number on the y-axis the sequence on the zx-plane maps to.
-
1\$\begingroup\$ How common and complex do you want invalid combinations to be? I say this because it would be trivial to set the symbols to a number base, and then just say that zeroes to the left are invalid. \$\endgroup\$Theraot– Theraot2025年08月16日 07:35:49 +00:00Commented Aug 16 at 7:35
-
\$\begingroup\$ I want something lightly complex, but, game manageable. Even, three (or more?) such schemes, with increasing levels of game dexterity and complexity. Thanks. \$\endgroup\$Joselin Jocklingson– Joselin Jocklingson2025年08月16日 07:42:34 +00:00Commented Aug 16 at 7:42
-
2\$\begingroup\$ As currently phrased, we don't have a lot of guidance here to distinguish between mappings that would be well-suited to your goals versus ones that would be ill-suited. One could take a meander through the Online Encyclopedia of Integer Sequences and just pick out anything that's quirky and doesn't grow "too" quickly, and float that as a suggestion. That makes narrowing down the "best"/"optimal" directions very tricky. To help guide our search, could you edit your question to include some more concrete criteria or traits that you want / don't want the game rule to have? \$\endgroup\$DMGregory– DMGregory ♦2025年08月16日 11:58:02 +00:00Commented Aug 16 at 11:58
-
1\$\begingroup\$ I don't understand the description of your game. Are you making a rule-deduction game, in the vein of The Witness, where the player is presented with a series of symbols and not told what they mean or how they interact, and they must deduce the rules before they can play the game? Or is it more of a mental arithmetic game where you're scored on how fast you can calculate 434/14, and answer in base two? \$\endgroup\$Toph– Toph2025年08月19日 16:54:55 +00:00Commented Aug 19 at 16:54
2 Answers 2
To make the system easier for players to learn, it might help to base your system off something they already have some knowledge of, like Roman numerals.
We could make our own Roman-style scheme just by picking new symbols and less-familiar values for them to make it a little more alien, something like...
1 | 3 | 7 | 23 | ... |
---|---|---|---|---|
🔹 | 🔷 | 🔸 | 🔶 |
From that we can make allowable sequences like...
1 🔹
2 🔹🔹
3 🔷
4 🔷🔹
5 🔷🔹🔹
6 🔷🔷
7 🔸
8 🔸🔹
9 🔸🔹🔹
10 🔸🔷
11 🔸🔷🔹
12 🔸🔷🔹🔹
13 🔸🔷🔷
14 🔸🔸
15 🔸🔸🔹
16 🔸🔸🔹🔹
17 🔸🔸🔷
18 🔸🔸🔷🔹
19 🔹🔷🔶
20 🔷🔶
21 🔹🔹🔶
22 🔹🔶
23 🔶
24 🔶🔹
25 🔶🔹🔹
26 🔶🔷
We could add a sign symbol to extend this to include zero and negative integers, maybe something like...
-5 🔹🔹🔷⭕
-4 🔹🔷⭕
-3 🔷⭕
-2 🔹🔹⭕
-1 🔹⭕
0 ⭕
1 ⭕🔹
2 ⭕🔹🔹
3 ⭕🔷
4 ⭕🔷🔹
5 ⭕🔷🔹🔹
Roman-style numerals are a little awkward for paper arithmetic like we're used to, but they're well-suited to figuring on an abacus, which could make for an enjoyable tactile game interaction on a touchscreen. 😁
🧮
-
1\$\begingroup\$ This is called a "sign-value notation" system, because each sign always means the same value and they're added together. Lots of ancient cultures used them, they were reinvented many times so apparently they're easy to come up with. Our current system is a "positional notation", so named because the value of a sign increases based on its position. To give you some terminology to look up. \$\endgroup\$Toph– Toph2025年08月19日 17:01:09 +00:00Commented Aug 19 at 17:01
Ok, you are looking for multiple ways to represent the integers with custom symbols, with some invalid combination.
As I said in the comments, one way to do it is to make a number base. So if you have S symbols, you use the numeric base S and you are done. In this setting any zeroes to the left could be considered invalid combinations.
Now, since you want multiple difficulties, I had to think about it a bit more.
What if S is 1? Then all the combinations are the same symbol repeated multiple times. And thus the problem reduces to a mapping from natural numbers (how many times do we repeat the one symbol) to natural numbers.
Thus, I believe it is fair to split the problem in three:
- How to represent integers with S symbols: This is already solved, you use the S base
- How to map natural numbers to natural numbers without creating collisions and leaving invalid entries
- And how to make it harder
So, for the mapping, it is easier if you think about it backwards: It is not how to come up with ways to combine the symbols so that applying some function they give you the natural numbers... Instead it is what function do you apply to the natural numbers so you get the natural numbers but skipping some, and the function can be inverted.
The solution to that is to use a linear function. So you take the natural number, multiply by some value, and add some offset. The inverted function substracts some value and divides. Not every input will give you a natural number (either because the subtraction give you a negative, or because the division is not integer), those are your invalid combinations. As as you know, the linear function does not have multiple solutions, so we know there are no collisions.
Now, to make it harder, we could take advantage of those operations... Difficulty 1: Just Substract, Difficulty 2: Just Divide, Difficulty 3: Do both.
Note: you can use prime numbers to make it harder to figure out.
However, I believe you can do more. If the goal is to make it harder to know the number, then we go to cryptography. I don't think a substitution cipher is of much use since we are already dealing with custom symbols. But you could rearrange the digits.
What is rearranging? Well it is a mapping from the original position of the digit to the new position of the digit, so it is something similar to what we were already doing. However this time we don't want gaps. The solution is to make blocks and add padding. Then you can do whatever permutation you want inside the block.
Now, your mapping would be:
- Revert the permutations
- Divide (some combinations become invalid here because they are not integer)
- Substract (some combinations become invalid here because they go negative)
- Change of base (if it applies)
Addendum: I'm now thinking it might be easier to change the base first and then operate, that also works.
Thus, the problem you are dealing with is: Can you do math operations with numbers that has been encrypted? And yes, that is a thing.
You might be interested in Homomorphic encryption, they do not only allow to do some computations with the encrypted values, but they allow to do those computations without knowing the values (so you can do the computation without knowing the inputs or the result).
You must log in to answer this question.
Explore related questions
See similar questions with these tags.