 # New form of logic. Calculator made from only bind echo and alias along with other logic

I created a calculator only using the scripting commands in the video game Counter-Strike, bind (for input) echo (for output) and alias (for the logic). Bind is to connect keys to a command or string of specified commands, echo is to output text to the console, and alias is a command that allows you to create a new command out of a string of specified commands. Basically, I can do math without using math. This is pure connectionism, where there are no values, no logic operators and no measurements in the logic. It is purely making, breaking and using connections and nothing else.

The first few paragraphs from my paper that I am working on:

How To Compute Without Variables, Logic Operators or Measurements

Work in progress

I have come up with what I believe is a new type of logic, it is mechanical in nature, but because I could maybe see it done on the quantum level it could be far more complex than any mechanical machine has ever been, in ways not seen in physical mechanical devices.

This logic is pure connectionism, only using connections and nothing else. I look at it as a geometry of logic. My system performs the logic only using one command without numeric variables, without logic operators, and without measurements. This is neither digital nor analog logic.

This is not theory, I have built a working model using this logic that demonstrates if-then, do-while, a randomizer, a relational database and other logic, including a rudimentary calculator that adds/subtracts/multiplies/divides. In the working model I only use one command for hooking in the input, a few commands for output, but all the logic in between is one command that does nothing but link commands together.

The logic demonstrated in this model uses the command “alias”, which is used in a FPS video game called Counter-Strike, which is a modification for a video game made by Valve called Half-Life, which is based on id Software’s QuakeWorld engine. This command is used to link various commands together creating a new command that executes a command string, to provide a way for customizing the interface of the game. This logic requires input and output provided in the game - which, no doubt, uses Boolean logic to perform, but the logic itself is contained to using the one command “alias” and does not use Boolean logic.

You can also find the paper here, but you have to download it to read it: https://github.com/johnvlilley/Stateless-Computer

I suggest you start with the simple version of the calculator that does just add and subtract: https://github.com/johnvlilley/State...tor_simple.cfg

And the complex calculator has much better inline commenting: https://github.com/johnvlilley/State...or_complex.cfg

I am interested in taking some of the logic, perhaps the most complicated part - the grenade throwing script, and visually re-creating it in Minecraft. This part of the logic performs the permutations of a math question I came up with and was answered by using the ancient Chinese Pascal’s Triangle in a new way. It is similar to the question of how many combinations of 4 hats on 4 pegs you can have, and I just had to count the pegs as part of the permutation where they did not.

Here is the question:

“You have a combination padlock with four dials on it. Each dial has the numbers 0 through 4 on them. The lock can have as many 0s as dials, and is set to 0000 by default. The lock does not allow you to use any number between 1 and 4 two or more times in the combination. The following combinations are valid: 0123 1234 0103 0010 4031. The following combinations are invalid: 0113 4014 0202 4444. How many possible combinations are there?”

The solution to this word problem is here, notice that it is a new use for Pascal’s Triangle, because it values nothing as something:

More formulas can be found here:

http://mathhelpforum.com/discrete-math/17147-combination-lock.html

Well, no, you’ve abstracted your math into video game commands. The math is still being used, you just havent written it YOURSELF, you’ve borrowed Valve’s engineers to write it for you.

It’s akin to me saying “I do database retrieval without database commands. I just use an AJAX request to this page called givemedbinfo.php with the fields I want”. Yes, i’ve managed to not write database commands. But givemedbinfo.php certainly does.

1 Like

Sorry, but where do I use numeric variable, logic operators or measurements?

Again; You have succeeded in not typing any yourself. You’ve used the Valve engineers. It doesnt mean your process is free of these things, just that you’ve hidden them behind a curtain with the words “Counter-Strike” plastered on it. For example:

`alias addsub9 "echo 9; rotate; rotate; rotate; rotate; rotate; rotate; rotate; rotate; rotate; alias multiplier addsub9"`

So what you’ve done is abstract ‘rotate’ as `x = x+1`.

That is just the calculator. Explain the code in slapaho5.cfg where I am not having anything to do with math, that does all the permutations of this math problem:

You have a combination padlock with four dials on it. Each dial has the numbers 0 through 4 on them. The lock can have as many 0s as dials, and is set to 0000 by default. The lock does not allow you to use any number between 1 and 4 two or more times in the combination. The following combinations are valid: 0123 1234 0103 0010 4031. The following combinations are invalid: 0113 4014 0202 4444. How many possible combinations are there?

If you expand it to 18 wheels and 18 numbers, that is 3x10 to the 18th possible permutations that I can hit any one of those permutations in 18 or less keystrokes.

Congratulations, you’ve written a function.

Let’s take just the very first line of your code. It is equivalent to:

``````let gs1,gs2,gs3,gs4;
let gsrst = function() {
gs1 = function() { gbutrot() }
gs2 = function() { gbutrot() }
gs3 = function() { gbutrot() }
gs4 = function() { gbutrot() }
}
``````

Nothing new or fancy there. You’ve just coded in CS. You’ve defined functions. Your functions define a state of the grenade slots, corresponding to the numbers of the dials. You havent avoided using numbers, you’ve simply said that an HE grenade = an integer value of 1.

For the record, here’s an exhaustive solution to the problem in Javascript for 4 wheels and 5 values (0-4):

``````let array = [];
for(let i = 0; i < 5; i++) {
for(let j = 0; j < 5; j++) {
for(let k = 0; k < 5; k++) {
for(let l = 0; l < 5; l++) {
array.push(""+i+j+k+l); }}}}
array.map((x) => {
if(x == "0") { x = "a"+x+x+x;}
if(x == "0") { x = x+"b"+x+x; }
if(x == "0") { x = x+x+"c"+x; }
if(x == "0") { x = x+x+x+"d"; }
return x;
}).filter((x) => {
return !(x == x || x == x || x == x || x == x || x == x || x == x)
});
``````

Yes but I did it all without using numbers. The logic itself does not use numbers. Yes of course you can make an algorithm in another language, the point is I did the same you did with those algorithms without using math.

https://en.wikipedia.org/wiki/Pointer_aliasing < this is similar to what I am doing, and nothing else.

No, you didnt. You just used a grenade AS a number. You did the exact same thing as everyone else who solves the problem, you just used an abstraction of a number.

What you’re saying is “I got four each of apples, bananas, oranges, strawberries, and kiwis, and solved the problem without numbers by putting them in sequences.”

apple = 1
banana = 2
orange = 3
strawberry = 4
kiwi = 0

It’s not doing it without maths, it’s just using a different language. Instead of the number, you have a thing.

Also for those that may actually be interested, since this back and forth stirred my coding brain and the ugliness of my previous code, I flexed it a bit and wrote a function that does it for any number of wheels up to 35:

``````function combowheel(w) {
let alphabet = "0123456789abcdefghijklmnopqrstuvwxyz";
let array = LoopIt(w,"",alphabet.substring(0,w+1).split(""));
array.splice(0,1);
let cypher = ";!@#\$%^&*:ABCDEFGHIJKLMNOPQRSTUVWXYZ";
return array.filter((x) => x.split("").map((y,i) => (y == "0") ? cypher[i] : y).filter((v,i,a) => a.indexOf(v) === i).length === x.length);
}

function LoopIt(depth, baseString, arrLetters) {
var returnValue = "";
for (var i = 0; i < arrLetters.length; i++) {
returnValue += (depth == 1 ? "," + baseString + arrLetters[i] : LoopIt(depth - 1, baseString + arrLetters[i], arrLetters));
}
return returnValue.split(",");
}
``````

With thanks to @DaveMaxwell’s code for generating combinations here

[Fair warning: I am not responsible for you flooding your memory buffer by attempting to store 35^36 strings in an array.]

1 Like

That is cool, you see you can achieve any of those permutations in just a few keystrokes (compared to the size of the number).

The point is I am not using math, I am only using pointers, but I am doing things that can be represented mathematically.

You’re using pointers, but you’re still executing the mathematical operations through commands.

But you… enjoy your bliss. I’m gonna give up explaining to the wall why you’re still doing the math.

Yes I am emulating math but it is just strictly pointers, and nothing else.

This topic was automatically closed after 91 days. New replies are no longer allowed.