The World Machine Think Like A Coder Ep 10

As Ethic falls, she remembers.

She remembers the world before
they unearthed the crystal.

She remembers the glee she felt
when she built her first robot.

But mostly she remembers
the friends she’s made

these last few days:

courageous Adila
and her resistance movement.

Octavia’s sacrifice to keep
the guards distracted.

Lemma and her idealistic
drive to cure everyone.

And Hedge.

Her creation, her responsibility,
her failure… her betrayer.

Hedge, who convinced her to collect
the three nodes

that she never actually needed.

For Ethic remembers how to operate
the World Machine.

If only she could get
a second chance at it.

Adila has been in radio contact
with Octavia,

whom the robots captured and imprisoned
in the same jail that held Ethic.

Ethic explains that Hedge
has manipulated them all,

and will now try to break down
the Bradbarrier

and cover the entire world
in a giant maze,

unless they can stop him.

But she has a plan:

Ethic herself will go
to the crystal at the center of the maze

and use its powers to stop Hedge.

Meanwhile, Adila and Lemma will do
whatever they can to slow Hedge down.

As Ethic weaves her way towards
the innermost maze,

her radio picks up a transmission.

Octavia has freed hundreds of members
of the resistance from stasis.

Together, they’ve staged a jailbreak
and overwhelmed the guards.

The resistance has access
to the World Machine,

but they don’t know how to use it;
they’ll need Ethic for that.

All they have at their disposal
are nearly limitless spools of wire.

The strands are durable, but prisoners
can break them deliberately

if they need to.

Ethic reaches the entrance to the inner
most maze… and it’s sealed from within.

She remembers a few things from
when she flew over the maze days earlier.

It centers on the crystal.

There are many dead ends,
but no paths that loop back on themselves.

Ethic has one opportunity to radio
the members of the resistance

a simple set of instructions

before they plunge into the labyrinth
in search of the exit.

What directions can she give them so
they can quickly navigate the maze,

open the door, and guide Ethic
straight back to the crystal?

Pause now to figure it out for yourself.

Hint in 3

Hint in 2

Hint in 1

Here’s a hint:

One of the challenges here is to find
a way to indicate where dead ends are,

so that the resistance members
don’t keep going down them.

Try simplifying the maze
to something like this.

Let’s say you’ve just hit this dead end,
then came back to this intersection.

What could you do to show the next
person who gets here

that they don’t need
to explore that path?

Pause now to figure it out yourself.

Solution in 3

Solution in 2

Solution in 1

Most programming puzzles involve
giving instructions to a single actor

so that they can accomplish a goal.

Instead, here we have a swarm
of individuals,

each of whom can follow
basic instructions.

That’s unusual in programming,
but not unheard of;

researchers are currently experimenting
with swarms of small robots

to do things like conduct search
and rescue missions.

The prisoners aren’t robots, but for
Ethic’s purposes they’ll act like them.

And by working together they can
achieve their goal much more efficiently.

Because you have a lot of prisoners,
you’ll want them to cover a lot of ground.

This matches up well to a maze-mapping
technique called a depth-first search.

It’s called that because it involves going
as deeply down a path as possible

before going back.

In other words, if you had
a maze like this,

you’d want to explore all the way
down one of these branches

before returning to this intersection
and trying another.

Everyone needs a clear set of instructions
for what they should do.

Like — first, tie down the loose end
of your wire by the crystal,

so it leads back there.

If you find the door,
open it and hand your spool to Ethic.

If you’re in a passageway,
keep going until you hit a dead end

or an intersection.

But what happens
at either of those places?

If someone encounters a dead end,

they should backtrack
to the last intersection.

But they also need to mark it, so no one
wastes time and goes back there.

The best tool for that is the wire—

one option is to break both sections
that lead down the dead end path,

and tie the spool to the wire
that leads back to the crystal.

The broken wires tell everyone else
who gets to this intersection

“Don’t go this way.”

They’ll also guarantee the final path
will lead straight to the crystal,

rather than visiting dead ends.

Ok, so let’s say someone’s
at an intersection.

Now which way should they go?

The first priority is to have everyone
cover fresh ground

to minimize doubling up.

So if there’s no wire down a direction,
go that way.

If there are multiple choices,
choose one at random.

What if they’re in a sub-section
like this, with 3 marked dead ends?

The only thing to do is to go back
where they came from.

We now know that this whole section
is one big dead end,

so they should break and retie the wire
when they get to the next intersection.

But let’s say they get there, and find
two options where someone’s exploring,

but no one’s hit a dead end yet.

They may as well choose at random
and go help explore that path further,

in case it’s the right
direction for the exit.

This isn’t the only way to solve this
challenge, but in any correct method,

someone will eventually
find the way out.

The moment of truth will be when Ethic
takes their wire and follows it back,

inward towards her goal.

The great thing about this method
is that Ethic’s path is straight and true.

The maze doesn’t have loops, so there’s
only one path from door to crystal.

And because everyone has been
breaking and retying their wires,

Ethic won’t go down any dead-end paths.

Face to face with her creation,
Ethic has a choice:

she can destroy Hedge,
or set things right.

All of this destruction was her fault,
not Hedge’s;

it was her oversight that instructed
him to build an infinitely large maze.

His decisions were misguided,
but everything he did,

he did to follow his programming.

Ethic accesses his core and fixes
her error with a single number:

the size the maze was supposed to reach.

Ethic has prevented catastrophe

and regained possession
of the World Machine.

Her work with Adila, Octavia, and Lemma
has already started to help people

and heal the world’s turmoil,
but there’s much work to be done.

With the forgetting food
out of their systems,

the people will become themselves again.

They’ll regain their will to create
and progress.

They’ll be free to break down the walls
they’ve built between each other.

And they may come to approach
their future with a little less greed

and a little more… Ethic

当 Ethic 倒下时,她记得。

她记得
他们出土水晶之前的世界。

她记得
当她建造她的第一个机器人时所感受到的喜悦。

但大多数情况下,她都记得最近几天
她结交的朋友

勇敢的阿迪拉
和她的抵抗运动。

奥克塔维亚为了让守卫分心而做出的牺牲

引理和她
治愈所有人的理想主义动力。

和对冲。

她的创造,她的责任,
她的失败……她的背叛者。

Hedge,说服她收集

她从未真正需要的三个节点。

因为 Ethic 记得如何
操作世界机器。

要是她能
有第二次机会就好了。

阿迪拉一直在与奥克塔维亚保持无线电联系

机器人将奥克塔维亚俘虏并关押
在关押 Ethic 的同一所监狱中。

Ethic 解释说 Hedge
已经操纵了他们所有人,

并且现在将试图
打破 Bradbarrier


在一个巨大的迷宫中覆盖整个世界,

除非他们能阻止他。

但她有一个计划:

Ethic 自己将
前往迷宫中心的水晶

并使用它的力量阻止 Hedge。

与此同时,Adila 和 Lemma 将
尽其所能减缓 Hedge 的速度。

当 Ethic 向
最里面的迷宫前进时,

她的收音机接收到了一个信号。

Octavia 已将数百名抵抗组织成员
从停滞状态中解放出来。

他们一起进行了越狱
并压倒了警卫。

抵抗军
可以使用世界机器,

但他们不知道如何使用它;
他们需要道德。

他们所拥有的
只是几乎无限的线轴。

这些股线很耐用,但如果需要,囚犯
可以故意折断它们

Ethic 到达了
最里面的迷宫的入口……它从里面被封印了。

她记得
几天前她飞越迷宫时的一些事情。

它以水晶为中心。

有许多死胡同,
但没有自己循环的路径。

Ethic 有一次机会向
抵抗组织的成员发送

一组简单的指令,

然后他们就会跳入
迷宫寻找出口。

她可以给他们什么方向,以便
他们可以快速导航迷宫,

打开门,并引导 Ethic
直接回到水晶?

现在停下来自己弄清楚。

提示 3

提示 2

提示 1

这里有一个提示:

这里的挑战之一是找到
一种方法来指示死胡同,

这样抵抗成员
就不会继续往下走。

试着把迷宫简化
成这样。

假设你刚刚走到了这个死胡同,
然后又回到了这个路口。

你能做些什么来向下
一个到达这里的人

表明他们
不需要探索那条路?

现在停下来自己弄清楚。

3 中的

解决方案 2 中的

解决方案 1 中的解决方案

大多数编程难题都涉及
向单个参与者发出指令,

以便他们完成目标。

相反,这里有
一群人,

每个人都可以遵循
基本的指示。

这在编程中是不寻常的,
但并非闻所未闻;

研究人员目前正在
试验成群的小型机器人

来执行搜索
和救援任务等任务。

囚犯不是机器人,但出于
Ethic 的目的,他们会表现得像机器人。

通过共同努力,他们可以
更有效地实现目标。

因为你有很多囚犯,
你会希望他们覆盖很多地方。

这与
称为深度优先搜索的迷宫映射技术非常匹配。

之所以这样称呼,是因为它涉及在返回之前
尽可能深入地

走下去。

换句话说,如果你有
这样的迷宫,

你会想一直探索
这些分支中的一个,

然后再返回这个十字路口
并尝试另一个。

每个人都需要一套明确的指示
来说明他们应该做什么。

就像 - 首先,用水晶系住电线的松散
端,

这样它就会回到那里。

如果你找到门,
打开它并将你的线轴交给 Ethic。

如果您在通道中,
请继续前进,直到遇到死胡同

或十字路口。

但是
在这两个地方会发生什么?

如果有人遇到死胡同,

他们应该
回到最后一个路口。

但是他们也需要标记它,所以没有人
浪费时间然后回到那里。

最好的工具是电线 -

一种选择是断开
通往死胡同路径的两个部分,

并将线轴系在通向晶体的电线
上。

断掉的电线告诉所有
到达这个十字路口的人

“不要走这条路”。

他们还将保证最终路径
将直接通向水晶,

而不是走入死胡同。

好的,假设有人
在十字路口。

现在他们应该走哪条路?

首要任务是让每个人
都有新的领域,

以尽量减少翻倍。

所以,如果没有电线向下的方向,
走那条路。

如果有多项选择,请
随机选择一项。

如果他们在这样的子部分中
,有 3 个标记的死胡同怎么办?

唯一要做的就是
回到他们来自的地方。

我们现在知道这整个路段
是一个大死胡同,

所以
当他们到达下一个十字路口时,他们应该断开并重新连接电线。

但是假设他们到达了那里,并找到
了有人正在探索

但没有人陷入死胡同的两个选项。

他们也可以随机选择
并帮助进一步探索这条路

,以防它是正确
的出口方向。

这不是解决这一挑战的唯一方法
,但任何正确的方法,

最终都会有人
找到出路。

关键时刻将是当 Ethic
拿起他们的电线并追随它,

向内朝着她的目标前进。

这种方法
的伟大之处在于,Ethic 的道路是笔直而真实的。

迷宫没有环路,所以
从门到水晶只有一条路径。

而且因为每个人都在
断开和重新连接他们的电线,

Ethic 不会走上任何死胡同。

面对她的创作,
Ethic 有一个选择:

她可以摧毁 Hedge,
或者让事情变得正确。

所有这些破坏都是她的错,
而不是赫奇的;

正是她的疏忽让
他建造了一个无限大的迷宫。

他的决定被误导了
,但他所做的一切都是

为了遵循他的程序。

Ethic 进入他的核心并
用一个数字修正了她的错误:

迷宫应该达到的大小。

Ethic 阻止了灾难

并重新
拥有了世界机器。

她与 Adila、Octavia 和 Lemma 的合作
已经开始帮助人们

并治愈世界的动荡,
但还有很多工作要做。

随着忘记食物
从他们的系统中消失

,人们将再次成为他们自己。

他们将重新获得创造
和进步的意愿。

他们可以自由地打破
他们在彼此之间建造的墙壁。

他们可能会
以少一点贪婪

和多一点……来接近他们的未来。