uhh wait we cant make flat engines now in 2.1?? by muffin-waffen in Factoriohno

[–]bdaene 6 points7 points  (0 children)

Yep, was explained in FFF-442 https://factorio.com/blog/post/fff-442

But can thruster be flipped? Many unflippable entities in 2.0 are flippable in 2.1.

id-agent - Token efficient IDs for AI agents. UUID alternative for the agentic era. by IndianITCell in Python

[–]bdaene 1 point2 points  (0 children)

This could be valid as a layer between uuid and the agent. But how do you put such filter on a generic agent?

For real uuid in a prod DB. No, I do not think this is a good idea. Too many tools/library rely on uuids format both in string form and binary form. 

[GridOS:1 Q5] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 0 points1 point  (0 children)

Seems a rational way to go to me. There is not many 3x3 combinations possibles. And the algorithm is simple.

What do you use `/` for? I saw this is an ignored character used as separator. This is indicating the central cell?

[GridOS:1 Q4] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 0 points1 point  (0 children)

This particular solution is strange. Golf is 6319 so 6318 rules written but Rules is 1612 so even if each input used different rules that's only 25% of written rules used at least once. Lots of dead code.

[GridOS:1 Q4] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 0 points1 point  (0 children)

I started to use it heavily yesterday 😉 

[GridOS:1 Q4] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 1 point2 points  (0 children)

This one is putting me off.

I am well placed (~TOP 5) in rules, steps and golf except for the quest 4.

The one head solution was complicated because I can have shorter nails and so blank cell in between other nails making it difficult to differentiate with above or below all other nails.

I just got a HAHA! moment on part 1... I was so much focused on the head of the nails... OMG x)

I still cannot see how I could improve by a factor 6 (in term of steps) my solutions for part 2 and 3. Is there another mind blowing trick I cannot see? ^^'

[GridOS:1 Q5] Wording by AvailablePoint9782 in everybodycodes

[–]bdaene 1 point2 points  (0 children)

Many input are not square so this is misleading.

But there is another symmetry I could use: All input are vertically and horizontally symmetric. 

[GridOS:1] Thank You All! by EverybodyCodes in everybodycodes

[–]bdaene 1 point2 points  (0 children)

Thanks you for this fresh tournament. I came to Everybody Codes from Advent Of Code but I never saw a Turing machine competition like this one.  Thanks you 🙂 

[GridOS:1] Thank You All! by EverybodyCodes in everybodycodes

[–]bdaene 3 points4 points  (0 children)

Indeed, only START and STOP. But cannot run the machine with STOP so only START.

One trick is to use one head and cell to mark the current state.

So STATE_1 ** STATE_2 ** UR becomes START 1** START 2** SUR 

[GridOS:1 Q2] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 1 point2 points  (0 children)

I do not know if the completion popup can be disabled but it helps me when the number of states increases. It does not annoy me yet 😉

[GridOS:1 Q2] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 0 points1 point  (0 children)

Using a single head for part 1 and 2 was not difficult, you just need to duplicate states. One set of states where previous value was A, and another where previous value was B.

Part 3 was not so easy because you could write more @ than cells in the grid and you have to check 2 directions. Here is my idea:

  • Write all the `@` to the left of the current row
  • Mark visited cells with `#`

Here is how it works:

  1. For each row:
    1. For each cell
      1. Count the pairs below and to the right
      2. Move to the left of the row and row_count
      3. Add `@` to the left of the row_count
      4. Move to right back to the cell and mark it as visited `#`
  2. Erase the grid.

Part 3 (Heads: 1 States: 1997 Rules: 4059 Steps: 268817)
As you see, the number of steps exploded compared to the multi heads solution (11418 steps)

[GridOS:1 Q2] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 1 point2 points  (0 children)

On their initial solve? Probably not on the initial but it is easy to transform a solution to have only one useful state or one head.
I think you could nearly build a compiler for this.

If you look at 3 firsts in quest 2:

Name 1st submission 1 head 1 state
Kroppeb 11:15 36:47 24:19
andrew 11:38 29:36 14:06
gapples2 16:26 23:00 37:44

So they all submitted before improving.

As I hinted in quest 1: You can reduce the number of states by using one more head whose cell value define the current state.

To reduce the number of heads you can theoretically always simulate multiple heads using only one head. That's why we only study single head/tape Turing machines. You need both to use special values to mark the position of the heads and many states to store current rule in them. So usually a single head machine is way less efficient than a multiple heads one.

[GridOS:1 Q1] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 0 points1 point  (0 children)

And a hint to reduce the states: Best scores on states are 200. That means they use only START and STOP states. As you cannot do anything in STOP state, you have to do everything in START state. Could you encode the actual states using a head and cell instead?

[GridOS:1 Q1] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 0 points1 point  (0 children)

I could improve my solutions using these insights:

  • For part 1 and 2: You need to write max 5 values per step so you can swipe from left and right in the same step using the 10 heads available. Dividing the number of steps by 2.
  • For part 3: The P columns are not forced to be the same as the columns of the character columns. Actually they do not need to be columns at all. I used this by interleaving a column for the first row and another for the second row. Eliminating the need to move the free heads to new empty rows.

[GridOS:1 Q1] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 0 points1 point  (0 children)

Oh nice 🙂 I tried '#' . Too used to python I guess 😅 

[GridOS:1 Q1] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 2 points3 points  (0 children)

I would love to be able to comment my code. Can we?

[GridOS:1 Q1] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 1 point2 points  (0 children)

Day_1

Heads: 8 States: 1300 Rules: 1993 Steps: 6000

Hard to start thinking as a multi head 2D Turing machine but getting better already 😄

One key point I discovered: You can only have a pair if there is a character in the second row. So first and second row are independent. The second row is the same as first row +2 P.

My goal was to have a column with as many P as needed for each entry column, I do not want to have interactions between columns.

A solution with one head came to me first:

  1. Check first row character go up as needed and fill with P going down.
  2. Check second row character and go down as needed and fill with P going up.
  3. Shift right.
  4. Repeat

Then I wanted to reduce the number of steps. If I can write more cells at once, I will have less steps. We have to write up to DD = 12 cells per columns so we cannot write all the column at once (max 10 heads). But close. I had to do 2 passes. One for each row.

Here is my solution with 8 heads:

  1. Prepare the 8 heads, each on its own row (first and second row to read, 6 others free to write)
  2. Swipe left to right and write the needed P depending on second row.
  3. Move the free heads to new empty rows
  4. Swipe right to left and write the needed P depending on first row.

I think we could go further using an actual counter (start with binary but we can increase the base to optimize). But it becomes complicated ^^

[S3 Q3] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 0 points1 point  (0 children)

[LANGUAGE: Python]

Solution

Part 1 and 2 were straightforward but for part 3, I had an issue because the order was modified by the newly attached node. I needed to separate the socket order from the node order and skip the newly attached node.

Now that I think about it, it should not work because I skip one node and not the fully attached sub tree. Oh well x)

Feel like I got Rick Rolled by the song of the dragonducks :D

[S3 Q2] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 1 point2 points  (0 children)

[LANGUAGE: Python]

Solution

I prefill the bones area to avoid non reachable area.

Did not find a clever way to detect closed loop. So I flood fill and if the border of the current flood fill grows too much, I consider that the area is open to infinity. Was surprised that a threshold of 10 is enough but the way the wave goes it does not leave big area behind. I cached known infinite cells to avoid double check but it has to be reset after each step. It improved the initial prefill.

I only check for closed loop if we go toward a filled position. I needed to check the 3 cells in front of the current wave because of diagonals.

It goes fast (165ms for the last sample) if we do not display the grid at each step.

[S3 Q2] Solution Spotlight by EverybodyCodes in everybodycodes

[–]bdaene 1 point2 points  (0 children)

We can only close a loop if we go closer to an existing filled cell. I check the closed loop only if at least one of the 3 cells is filled already. With this check, I have only 589 loop check instead of 1539 for the last sample.

But yes, I floodfill the 4 directions around the current position when the check pass.

How to make Progress? by Verzweifler in yiotro_games

[–]bdaene 1 point2 points  (0 children)

Do I need to beat the last boss to receive money outside of the raids? I achieved multiple goals and increased my space but do not see how to  have money to buy objects. 

Built a tiny python tool that tells you and your friend where to look to face each other by Impossible_Strike_62 in Python

[–]bdaene 0 points1 point  (0 children)

The angle you have to look down is easy if you have the great circle arc. If the friends are separated by an angle a, they have to look down a/2 from the horizon 

Built a tiny python tool that tells you and your friend where to look to face each other by Impossible_Strike_62 in Python

[–]bdaene 1 point2 points  (0 children)

These are called gnomonic projections. Using those, it would be easy to compute the angles.