SHENZHEN I/O

SHENZHEN I/O

评价数不足
Tesla Challenge 5: Superhero Agility Suit
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
3.968 KB
2017 年 4 月 8 日 上午 11:19
1 项改动说明 ( 查看 )

订阅以下载
Tesla Challenge 5: Superhero Agility Suit

在 89o 的 1 个合集中
SHENZHEN I/O Tesla Challenge Pack
24 件物品
描述
Subject: Superhero suits
From: Wu Lili 吴丽丽 <wulili@longteng-co-ltd.gd.cn>

We have received another assignment from Sun Haotian. This time, he wants us to create superhero-esque suits for people to run faster and jump (much) higher. They have motion sensors that should allow us to automatically detect when the user is running or jumping. This is an important assignment - Mr. Sun will be wanting thousands of them.

Subject: Re: Superhero suits
From: David 戴维 P. Solomon <daiwei@longteng-co-ltd.gd.cn>

I just heard Cool Dad pre-ordered one of these. They're going to be AWESOME!

---------

Small hint: Every jump lasts exactly 7 time units.

Big hint: The gen command can be very useful in both the jump and heel functions.

Optimization tip: For the rocket jump, use the command:
gen P X 0
(given that P is connected to the rocket output and X is connected to the dial)
2 条留言
pv2b 2018 年 3 月 3 日 上午 2:47 
After solving this, I find the spec is missing the following to be complete:

While the user is airborne, keep booster=50. A user landing is determined by 7 time units having passed (or possibly when motion=0)

Do not heel when motion=0.

With these modifications I was able to create a solution that passes the tests.
pv2b 2018 年 3 月 3 日 上午 2:23 
Nice puzzle, but the spec has some puzzles.

The test does not match the spec. At t=8, motion=63 and distance=10.

According to the spec, if motion>50 and distance <= 10, that means the user is running, thus set booster=100. However, in the test, in this case, booster=50.

Further, at t=9, motion=0 and distance=0.

According to the spec, if motion[t] < motion[t-1] (falling edge), and distance <= 10, then set booster=0. However, in the test, booster=50.

The "small hint" in the description on the workshop should be in the spec, otherwise it's not possible to completely implement the spec.

Further, the spec has references to radar-out and radar-in. They are not on the board. :-)

Here is an implementation of the spec as written: However it is not pass the tests. https://i.imgur.com/k5OhggX.jpg

I'm pretty sure though, that with the "small hint" I can make a different implementation that does pass the tests. :-)