字幕表 動画を再生する
Ethic, Hedge, and Adila, the leader of the revolution,
翻訳: Moe Shoji 校正: Yasushi Aoki
plot out how they can steal an artifact called the Node of Power.
エシックとヘッジと 抵抗運動のリーダーのアディーラは
It's being used to run a heavily fortified train that runs all around the country,
「力の石」なるアイテムを 盗み出す手立てを考えています
providing supplies to settlements and facilities.
居住区や施設に物資を供給して 国中を走り回る
This armored behemoth
厳重に警備された列車の動力に 力の石は使われています
undergoes a complex and unpredictable unloading procedure—
この大きな装甲列車の 荷下ろし作業は
a procedure which is displayed, in detail, on a screen within the engine car.
複雑で予測しがたく
Right means the train will go one car length forward,
その詳細は 動力車にある画面に 表示されています
and left means the train will go the same distance backwards.
「右矢印」は1両分 列車が前進するという意味で
While unloading, the train frequently moves back and forth,
「左矢印」は1両分 列車が後退するという意味です
so a typical sequence might look like this.
荷下ろしの最中に 列車は前後によく動くので
Also within the engine car is a button that can only be pressed once.
典型的な作業の流れは こんな具合になります
When pressed, it lets down the force field over the artifact for 10 seconds.
また動力車には 1度だけ押せるボタンがあります
The engine car is tiny and designed for a robot.
これを押すと力の石を守るシールドを 10秒間解除できます
Of your team, only Hedge can fit.
動力車内はロボット用に 小さく作られているので
The members of the resistance have positioned a crane over the train tracks
中に入れるのは ヘッジだけです
that can pluck the artifact once it's exposed.
抵抗運動のメンバーが 線路の上にクレーンを配置し
They'll know when to lower the crane by sight.
力の石が無防備になったところを 奪取する手はずです
But the only way Hedge can determine the train's position
いつクレーンを下げるかは 目で見て確認します
and know when to lower the force field
でもヘッジが列車の位置と
is by analyzing the unloading procedure,
シールド解除のタイミングを 判断するには
because he'll be inside the windowless engine car.
荷下ろし作業手順を 分析するしかありません
Hedge can't program himself though, so it's up to Ethic to tell him what to do.
なぜならヘッジは 窓のない動力車の中だからです
The artifact is in the car 10 positions behind
ヘッジは自分では プログラミングできないので
the one that's directly under the crane at the start.
ことはエシックが与える指示に かかっています
What instructions can Ethic give Hedge
最初 力の石のある車両は
so that he hits the button at just the right moment?
クレーンの真下の車両の 10両うしろにあります
Here's a hint to get you started.
エシックがどんな指示を与えれば
The key to this problem, as with many programming challenges,
ヘッジは ちょうどいいタイミングで ボタンを押せるでしょうか?
is to reframe the information in a way that a computer can work with.
ビデオをいったん止めて 自分で考えてみましょう
A computer doesn't know what a train is, nor does it need to.
考え方のヒントです
It can, however, work with variables.
多くのプログラミング問題と同様に この問題で鍵となるのは
Try making a variable that tracks the train's position.
コンピュータが扱えるように 情報を整理することです
How will it change as the train moves?
コンピュータは列車が何か知りませんし 知る必要もありません
Let's start by breaking this problem into two objectives.
でも 変数を扱うことはできます
The first is to know where the train will be as it carries out its instructions.
列車の位置を把握できるような 変数を考えてみましょう
The second is to hit the button when the train is in just the right position.
列車が動くにつれて その変数はどう変わるでしょう?
For the first objective it'll help to think of the train as a big number line.
[ビデオをいったん止めて 自分で考えてみましょう]
Let's make 0 the car with the node, 1 the car in front of it, and so on.
この問題を2つの目的に 分けることから始めましょう
That means car 10 is under the crane at the start.
1つめは指示を遂行して動く 列車の位置を把握すること
When the train moves one car right, car 9 is under the crane.
2つめは列車がちょうどいい位置に いるときに ボタンを押すことです
So a right arrow can be thought of as “subtract 1.”
最初の目的には 列車を 大きな数直線だと考えるといいでしょう
And when the train moves left from there,
力の石がある車両を0 その前の車両を1という具合に考えます
10 is back under the crane,
そうすると最初クレーンの真下にあるのは 10の車両になります
making a left arrow the same as “add 1."
列車が右に1両分進めば 9の車両がクレーンの下に来ます
Let's set our train position variable to 10, since that's where we start.
つまり右矢印は 「-1」と考えられます
We can now use a loop to read the instructions one at a time,
そこから列車が左に動けば 10の車両がクレーンの下に戻り
adding or subtracting as we go, to track which car is under the crane.
左矢印は「+1」 と考えられます
The nice thing about setting up the variable this way
まず最初の位置に基づいて 列車位置の変数に10を入れます
is that it tells us how far the node is from the crane.
ループを使って 指示をひとつずつ読んでいき
So as soon as the variable hits 0, Hedge should hit the button.
足したり引いたりすることで クレーンの下にどの車両がいるか把握できます
And here's what happens.
このように変数を 設定することの利点は
Ethic gets into position on the crane while Hedge rushes off
クレーンと力の石の距離が 分かることです
and slips into the engine car unnoticed, just before the train lurches to life.
変数が0になったらすぐに ヘッジはボタンを押せばいいのです
It rolls 3 cars back. 1 forward, another 4 back.
さて どうなるでしょう
Then so far forward Ethic loses track before it reverses once more.
エシックがクレーンに 取り付く一方で
When the artifact finally rolls into position,
ヘッジは列車が動き出す前に 急いで動力車に忍び込みます
Adila lowers the crane, hoping Ethic and Hedge got it right.
3後退して1前進 また4後退します
At the last possible moment, the force field sputters and falls.
それからエシックが見失うくらい 大きく前進してから また後退します
Ethic swoops in, and lifts the Node of Power to freedom.
ようやくアイテムがいい位置に来ると アディーラはクレーンを下げ
When Ethic gives the node to Hedge for safe keeping,
2人がうまくやっていることを 祈ります
something incredible happens.
ギリギリのところで シールドが解除され
The artifact shimmers to life with a vision of the past:
エシックがさっと手を伸ばして 力の石を手に入れます
When the crystal was unearthed, no one could make the console inside work.
エシックがヘッジに 力の石を預けようとすると
The government put out a call for people to try their luck with it,
信じられないことが起こります
one at a time.
アイテムが光り輝き 過去を見せ始めたのです
Ethic loved to figure out what made things tick, so she signed up.
あの巨大クリスタルが発掘されたとき 誰も中のコンソールを動かせず
Within moments at the console, something clicked into place,
政府は人々に助けを 呼びかけて
and she created her first robot.
1人ずつ試させました
The government hired Ethic as chief robotics engineer on the spot.
エシックは謎解きが好きなので 名乗りを上げました
Within a year her creations ran almost every aspect of society,
コンソールに向かってすぐに 何かがうまく動き出し
and the nation and its people thrived,
最初のロボットが 作り出されました
no longer needing to toil in the fields and factories.
政府はその場でエシックを ロボット主任技術者として雇いました
The vision ends, and Hedge detects the second artifact in the 198forest,
1年と経たないうちに 彼女のロボットが 社会のあらゆる側面を動かすようになり
to the southeast.
国も国民も栄え
Luckily, the train is going there next,
人々はもはや畑や工場で 働く必要がなくなりました
and has just enough reserve fuel for the trip.
過去の映像が終わると
Ethic and Hedge smuggle themselves aboard
ヘッジは2つめのアイテムが 南東の方角
and find a hiding spot for the long journey ahead.
198番森林にあるのを 探知しました