Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #61: Save the Astronaut

alex
11 - Bolide

I went back and reconciled my results vs the solution.  The deltas were in the assumption that:

1) camera pans in the direction that would travel the least amount of degrees - the solution had 5 rows that had the camera traveling over 180 degrees

2) camera would have to go back to 0 degrees if a there is a duplicate card in succession - the solution had 3 rows were the camera did nothing vs. going back to 0 and then back to the same card

3) kept the first period, but deleted the last period

 

Other than that, I matched the solution.  It was a really fun problem to solve.

 

 

 

 

SeanAdams
17 - Castor
17 - Castor

:-) pretty much the same solution as @Max06270, and also wasn't able to match the time exactly.

 

However - have some ideas to "science the !#$@ out of this" as our Astronaut mentioned in the film, and hoping to post this today or tomorrow morning.

Please hold....   ;-)

SeanAdams
17 - Castor
17 - Castor

:-) right - this is the WAY cooler version - 60% shorter communication time (11 mins)

 

Assumptions

Spoiler
- Assume that Mark understands Signal to Noise ratio (reasonable since he's NASA trained, and communcation tech is a big part of the training)
- Assume that Mark understands the basics of compression (possibly a bit uncertain, but again he is NASA trained and he's very handy with computers)
- Assume that Mark is capable of doing slightly more complex hex & binary work (which is fair since he did come up with the hex scheme in the first place, and he's clearly smart enough since he manages to create water in the biosphere)
- Assume our optimization function is reducing the time from the message receipt at the rover to Mark having the message in his head/paper. There's nothing we can do about the travel time of the message from earth to mars, but one of the big constraints is the time spent rotating the camera on the top of the rover, since this creates a delay in sending the next message
- NASA jargon is very specific, and several terms are frequently used - therefore we can use a dictionary replace for common terms that are important to Mark

Solution design

Spoiler
- strip out fluff words like "we" " are"
- change numbers to the direct HEX version instead of transmitting them as strings
- Some words can be changed to a dictionary code - for example the words ETA; month; Day are very common so instead of transmitting all these letters instead transfer a code to refer to this word
- Then then only plain-text words sent are those that are not fluff; numbers; or common dictionary words

This solution is not perfect though - I couldn't figure out how to split out negative numbers with a tokenize regex.

 

desire is to split the following text into 2 words:

input: "42 -10 14 fido" should transfer into 4 words being 42; -10; 15; fido.  

However - using the regex to detect word breaks (tokenize using \<\w+\>) discards the negative sign.  @MarqueeCrew, would you mind suggesting a better regex to tokenise this and still retain the - character on numbers?

 

 

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@SeanAdams,

 

why not try:

 

"[^a-zA-Z0-9-]"

 

it might be 

 

"[^a-zA-Z0-9\-]"

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
SeanAdams
17 - Castor
17 - Castor

worked like a charm (with a plus sign on the end to allow repeat characters)

[a-zA-Z0-9\-]+

 

Thank you!

PaulRB
8 - Asteroid

Here is my solution. Thanks for converting the start file for 10.5 compatibility.

 

Now the interesting part: how does my solution compare to the model answer & others posted here.

mceleavey
17 - Castor
17 - Castor

What a fantastic challenge. 

First, my assumptions are as follows:

 

1. The message is to be recreated exactly quoted, included cases and all punctuation in the quotes;

2. The camera must pause for one second on all cards, including an additional second pause on a sequentially repeated character (and not using @alex 's masochistic return to 0!) and counting one second for the final card;

3. The camera moves in the direction constituting the shortest distance.

 

Spoiler
First of all, my results are as follows:
1. With the one second pause on each card:

Results with delay.PNG

2. Without pause:
Results without delay.PNG

3. With a one second pause only for sequentially repeated characters:
Results with delay only for repeated characters.PNG

This is a little complex to break down, so it's easier to just have a look at the solution attached.

I get the same results as the posted solution up to a certain point, and that is the calculation of the camera degree. I've checked mine, and it starts to vary at row 59. I've checked my results manually and I get the same answer, so I don't know who has the correct calculation here, feel free to point out my mistake, however I see when there is a move from one character to another and back, I would assume those two movements would be the same distance which they are in my results but differ in the posted method. Again, I'm probably wrong, so please let me know!

 

 

 



Bulien

estherb47
15 - Aurora
15 - Aurora

Most challenging so far for me. Nothing new here.

NicoleJohnson
ACE Emeritus
ACE Emeritus

My solution. Loved this one! Partially because I would definitely save Matt Damon...

 

Assumptions:

  1. Remove spaces & characters. In life or death Mars rescue missions, proper punctuation is probably not necessary... I did leave the capital letters, however, as markers of a new "sentence" within the message.
  2. Adopted the "wait for 1 second at each card you stop at" philosophy proposed by others.
  3. Opted to go around in a full revolution if a card was repeated twice in a row, so that it was clear it was a new card.
  4. Solved two ways - once for a Rover that moves only in one direction (clockwise, same direction as the 0-9 A-F cards are laid out), and once for a Rover that could switch direction between cards (choosing shortest distance to the next card).
Spoiler
WeeklyChallenge61.JPG
LordNeilLord
15 - Aurora

Assumptions

 

 

Spoiler
-The camera takes the shortest difference between cards
-The camera pauses for 2 seconds on duplicate characters
-All characters and punctuation included

 

I was 11 seconds quicker than the provided answer, so win win for Mark Watney

 

Solution

Spoiler
Weekly Challenge 61.png

This has to be one of my favourite challenges to date...more like this please @JoeM