Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1410753 Posts in 69564 Topics- by 58557 Members - Latest Member: terk

September 17, 2024, 12:58:32 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogs5N²+6N-4 . . . . . . (codename)
Pages: 1 ... 12 13 [14]
Print
Author Topic: 5N²+6N-4 . . . . . . (codename)  (Read 65455 times)
a-k-
Level 2
**


View Profile
« Reply #260 on: December 23, 2023, 04:58:49 AM »

This project is really incredible. You're really cramming every language under the sun into it. Smiley

What language is it written in at its "core"?

Hey, thank you and welcome back!

I've really picked boring languages here that just get the job done, as if I knew I would develop the project for eternity: C++ and Python (and SQL).
The spin-off game, which competes for attention when the languages itch strikes, also adds Go to that mix.

About the latter, did you know that this comment of yours about performance art was an inspiration for my Double-Triangular Architecture? (*)
(Also future FaaS migration, which I haven't followed through because I started viewing network latency as a feature, let players wait before they get pass/fail...)

(*) Hexagonal was already taken, but I bet you prefer triangles anyway...
Logged

a-k-
Level 2
**


View Profile
« Reply #261 on: January 12, 2024, 09:24:01 AM »

Started adding support for outputs to the sandbox:


(meant to serve as an example, once released)
Logged

a-k-
Level 2
**


View Profile
« Reply #262 on: January 27, 2024, 02:49:01 AM »

Icely Puzzles made a wonderful Let's Play video (youtu.be/60hHZzZRohE), which has brought a surge of new players, and the game now has more than 90K player solutions:


(There were 41K solutions before, so they more than doubled in just 2.5 weeks!)


Meanwhile, I've delivered the second phase of the Sandbox level, so custom outputs can now be optionally specified:



Didn't recognize the specification language in the last posts? That's AngelScript.
Logged

a-k-
Level 2
**


View Profile
« Reply #263 on: February 22, 2024, 09:49:43 PM »

The third phase of the Sandbox is here:



Solutions are saved and are upgraded automatically whenever the player modifies the specification, but they're not submitted to the server so histograms and cost/cycles-based scoring aren't available.
Logged

a-k-
Level 2
**


View Profile
« Reply #264 on: March 08, 2024, 11:38:09 PM »

120K player solutions as seen by the algorithm that (indirectly) gave this blog its name:


(new term: N^2.5; suprisingly, it's not the rarest one.)

Icely Puzzles has made a second video (youtu.be/SmSKlNH8lzA), and I'm told that there's a player community in Chinese (in qq). Cool!
Logged

a-k-
Level 2
**


View Profile
« Reply #265 on: April 22, 2024, 10:12:53 PM »

Designing a new level in the Sandbox, for the first time:


(the input is a linked list of the numbers, sorted by value)

You can tell that I had a simpler version in mind:


(Sandbox Solutions screen; yellow = current specification/version)

That will also be the first time that adding a new level doesn't automatically bring me to the top of the leaderboard...
Logged

a-k-
Level 2
**


View Profile
« Reply #266 on: April 28, 2024, 06:07:41 AM »

Added Quipu to the captcha game:


(esolangs:practical languages ratio is now 5:16)
Logged

a-k-
Level 2
**


View Profile
« Reply #267 on: May 26, 2024, 12:33:32 PM »

A new advanced editing tool:

(Find, supporting multiple selection in and across criteria)

The UI can also be used to quickly see which workers (registers) are being modified (set) or accessed (get). Combined with Replace, which enables simultaneous reassignment of workers, and the ability to trace precedents/dependents by hovering the code, it's now a little easier to optimize for the number of workers.


(reminder: displaying precedents/dependents per def-use analysis)
Logged

a-k-
Level 2
**


View Profile
« Reply #268 on: June 08, 2024, 12:26:48 AM »

I added comments for equality of workers after Walk commands to help new players optimize the early levels, then discovered that such comments may sometimes be more confusing than helpful:


(a contrived example; the second "=a" comment wouldn't hold with better RNGs.)

As you can see above, comments like these can reveal the RNG limitations of the game and direct players towards assumptions that don't hold in the general case. It's not clear how often this issue occurs in practice, so for the time being I'm keeping them; in the future I may hide them behind the verbosity-level slider so that they won't get generated before loops are introduced.
Logged

a-k-
Level 2
**


View Profile
« Reply #269 on: July 03, 2024, 12:34:25 PM »



This may be easier to solve than I'd like.

--------
Update: maybe forgo primes?



This looks nicer, but it's going to be tricky to make the block numbers (the underlined numerators in the diagram) appear in ascending order as is done in the other 21 languages. This language requires that the denominators be ordered by divisibility (e.g. 300 must precede 20), and a naive algorithm won't necessarily be able to satisfy the (partial-) order relations of both the (block-numbered-) numerators and the denominators (that divide one another).


(two greedy assignments of block numbers (DFS and DFS/BFS); both create conflicts between the partial orders (top: 40 precedes 20 but 5 > 3, bottom: 300 precedes 20 but 4,5 > 3))
« Last Edit: July 04, 2024, 01:19:05 PM by a-k- » Logged

a-k-
Level 2
**


View Profile
« Reply #270 on: July 07, 2024, 11:30:40 AM »

FRACTRAN in the captcha game:



As you can see, I implemented the first option from the last post, and used prime numbers for the blocks. That's because the second option wouldn't work: FRACTRAN effectively processes fractions in their reduced form. For example, "8/40, 3/20" would be treated as "1/5, 3/20", and 20 will be replaced by 4 instead of 3. Somehow, I forgot why I chose prime numbers in the first place...
Logged

a-k-
Level 2
**


View Profile
« Reply #271 on: July 15, 2024, 01:10:25 PM »

The captcha game has finally found its audience:


(today: 24K games)

... OpenAI's bot, which "played" 77,000 puzzles just in the last 46 hours!


Unfortunately, it performs only GET requests, which unlike POST, don't include the session ID that's embedded in the <form>. Consequently, each request is treated as a new game, and the bot gets to see only a limited set of puzzles, and only in three languages:


(unique CFGs per number of conditions; the first puzzle of every game presents code with 1-2 conditions.)

So, to level the playing field, I've updated the server to add session IDs as URL query parameters when the user-agent contains bot as a substring. We'll see whether that pans out...


Logged

a-k-
Level 2
**


View Profile
« Reply #272 on: July 21, 2024, 12:11:43 PM »

Work in progress: control flow for a new language.

It's an assembly-like language that supports unlimited goto, so unstructured translations would be trivial. Of course, I'm aiming a little higher.

Code:
if (#1) {
    #2
    do {
        #3
    } while (#3);
    while (true) {
        #4
    }
}


("unstructured" vs. "structured" control flow. top: no structure + global jump labels; bottom: nested blocks + block-scoped jump labels.)

Debug prints:

Blocks: (#1 #2 (#3) (#4))
Control flow: ( #1 jmp_2_or_end/0 #2 ( #3 jmp_end/4_or_3 ) ( #4 jmp_4 ) )


(end = end of block; 0 = end of program)

Next step: generate the labels.
Logged

a-k-
Level 2
**


View Profile
« Reply #273 on: July 28, 2024, 12:42:38 PM »

1+ is now integrated in the main game:



Debug prints (with spaces for alignment):

Code:
Scopes:         ( ( #1                #2       ) #4                #3       ) #5
Control flow:   ( ( #1 jmp_end/4_or_2 #2 jmp_1 ) #4 jmp_end/5_or_3 #3 jmp_1 ) #5
(end = end of scope)

Labels:            ( L2: ( L4: #1    jmp_end/4_or_2__L10_or_L7 L7: #2    jmp_1__L4 L10: ) #4    jmp_end/5_or_3__L17_or_L14 L14: #3    jmp_1__L2 L17: ) #5
Numbered labels:   ( @1: ( @1: ==1== jmp_end/4_or_2__@3_or_@2  @2: ==2== jmp_1__@1 @3:  ) ==4== jmp_end/5_or_3__@3_or_@2   @2:  ==3== jmp_1__@1 @3:  ) ==5==

The last print is essentially assembly with locally-scoped labels:

{
@1:
    {
    @1:
        ==1==
        jmp @3 or @2
    @2:
        ==2==
        jmp @1
    @3:
    }
    ==4==
    jmp @3 or @2
@2:
    ==3==
    jmp @1
@3:
}
==5==


Except that the language has only one control structure that's a combination of jump and label: #

Code:
Final control flow:   ( ( 1 ## ( 1 ## ==1== 2+ # ==2== 1 # ) ==4== 2+ # ==3== 1 # ) ==5== )

... and only one literal number, so 11++ is used for 2+.


------
Meanwhile in the captcha department:


(OpenAI's bot struggling)

Due to the bot's apparent BFS nature, it submits several answers for each puzzle. Each answer causes the game to present a new puzzle, so the bot lags behind. Say, submits an answer to the n-th puzzle when presented with the 4n-th one. It does seem to ultimately synchronize though, otherwise it wouldn't manage to do better than 1 correct answer out of 44556 puzzles...
Logged

a-k-
Level 2
**


View Profile
« Reply #274 on: August 09, 2024, 09:59:53 PM »

140K player solutions:


(includes new levels and hints)


Languages, after adding 1+ also to other game:


(21 and 23 languages in the two games; 9 are common)
Logged

a-k-
Level 2
**


View Profile
« Reply #275 on: August 17, 2024, 08:50:30 AM »

I planned to add this language, but realized it'd be trivial to solve if you know what to look for and unfair if you don't:

Code:
# example: 7-->10, 5-->4, 3-->2, 9-->10
# replace 9999 with input

a := "x" "" ? "01 " ~ 9999 ~ ".!" "" ? ^
ba := "x(01) 7" "" ? "x(01) 9" "" ? + 10 *
bb := "x(01) 5" "" ? 4 *
bc := "x(01) 3" "" ? 2 *
x := ""

Anyway, as a bonus for completing the captcha game, endless mode now allows players to select language(s) for the next puzzles (and it's really endless, unlike before...)

======== Update ========

And this one looks cool but it's kind of halfway between assembly and 1+, which are already included:

Code:
Q♥             # while (true) {
    AAA        #     AAA
    BBB        #     if (BBB)
    K♦         #         break;
    CCC        #     CCC
2♥             # }
K♥
Q♦

======== Update 2 ========

Maybe this one?

Code:
C E G        # if (xxx) {
xxx          #
yyy          #     yyy
C E B        # }

98% of the Go puzzles have either return, break, continue or goto, and this language lacks them. I could use temporary variables, but currently, none of the other languages does, and here they'll be particularly unreadable.
« Last Edit: August 27, 2024, 12:24:04 PM by a-k- » Logged

a-k-
Level 2
**


View Profile
« Reply #276 on: August 29, 2024, 10:24:48 PM »

It's quite verbose for a simple loop with test in the middle:



Code: (debug prints)
DECLARE var_0 INT LET var_0 ONE  WHILE var_0 [0] LET var_0 <1> IF  var_0 [2] ENDIF ENDWHILE
CG#AD             CD#A      EGDG CEE   EDA   [0] CD#A      <1> CEG EDA   [2] CEB   CEF

* Just don't try to imagine how it sounds...
Logged

a-k-
Level 2
**


View Profile
« Reply #277 on: September 03, 2024, 12:15:17 PM »


(it gets easier over time)


It turned out that by implementing Velato:



I got Brainf.uck almost for free:




For fairness, the puzzles are restricted to perfectly-nested loops and conditions, so that players can ignore the values of variables/memory cells and focus only on the patterns, which are fully described in the hints.

Additionally in Velato, there's no need to know anything about music notation: the hints use note names and the language specs use intervals (modulus octave) - both are written explicitly.


======== Update ========

Oh well... the BF code above is bugous! The last minus sign should move before C, and then we can simplify the code by deleting it together with the plus sign.

Here's an up-to-date version of a similar (though not identical) control flow:


« Last Edit: September 04, 2024, 10:50:58 AM by a-k- » Logged

a-k-
Level 2
**


View Profile
« Reply #278 on: September 15, 2024, 11:32:49 AM »

Indenting assembly to make it look structured:

Code: (written manually, because no diagram)
0
if 1 then 2 else 14
while 3, 4:
    5
6
while true:
    7
    while true:
        8
        if 9 then return
        10
        if 11 then break
        13
    12



Then, assigning ??? to labels in batches of four:

Code: (in order of appearance)
label   #cond  #uncond  ?   len
0       1      0        d   1
1       0      2        h   1
2       1      0        s   1
3       0      1        c   1
4       0      1        h   2
6       1      0        d   2
5       1      0        s   2
      block 0
block 1
jz/jnz 0
    block 2
    jmp 1
label 0
    block 14
label 1
    block 3
    block 4
    jz/jnz 2
    block 5
    jmp 1
label 2
block 6
label 3
    block 7
    label 4
        block 8
        block 9
        jz/jnz 6
        block 10
        block 11
        jz/jnz 5
        block 13
        jmp 4
    label 5
    block 12
    jmp 3
label 6

Everything is ready for code generation...
Logged

Pages: 1 ... 12 13 [14]
Print
Jump to:  

Theme orange-lt created by panic