Jump to content
BrainDen.com - Brain Teasers
  • 0

Cartesian Boat Racing


CaptainEd
 Share

Question

This post is a variant on Superprismatic's Cartesian Racing challenge (). The movement rules are the same, but the path constraints are different--you don't have to land on specific spots, merely "round a mark".

Goal: Move your boat around the course in the minimum number of moves.

Movement: Your boat begins at the origin (0,0), with a velocity vector of (0,0).

Before each move, you specify an acceleration vector (a,b), where a and b can independently take on integer values from the set (-1, 0, 1).

The move consists of: (a) update the velocity by adding the acceleration, and then (b) move the boat by the velocity vector.

Example: if the prior location was (10,11), and the prior velocity was (2,5), and you choose the acceleration vector (1,-1),

the new velocity becomes (3,4) and the new location becomes (13,15).

Course constraints: The course consists of an ordered series of 5 marks. A mark is a line from a point to one wall of the course. (Assume the course is "infinite", that is, from (-100,-100) to (100,100))

Your path through the course must contain a move through each of the 5 marks in that order in the specified direction.

The first mark is the line (18,19)-(18,100), and must be traversed from left to right (that is, in increasing X).

The second mark is the line (14,13)-(14,-100), in increasing X.

The third mark is the line (34,24)-(34,100), in increasing X.

the fourth mark is the line (30,9)-(30,-100), in decreasing X

the finish line is the line (0,100)-(0,-100), in decreasing X.

If, somehow, you fall off the board during the race, you're disqualified. Believe me, you wouldn't have won, anyway.

However, if, somehow, you fall off the board while decelerating in a move AFTER the move that crosses the finish line, you will be presented your award posthumously; your race counts.

Any traversals in the "wrong" direction do not count in favor or against.

Any repeated traversals of the same mark do not count in favor or against.

The key is that one of your traversals of the first mark must precede one of the traversals of the second, which must precede one of the traversals of the third, etc.

These marks are chosen to make almost all solutions to Superprismatic's puzzle into valid paths on this course.

The minimum number of moves found (so far) for Superprismatic's car-racing post is 34. Can you beat that in a boat?

(Sailors, I am sorry, I understand the desire to dash across the starting line at top speed on starboard tack, but we'll start here in a luff. At least here, you can whistle for a wind.)

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Thanks for the compliment, CaptainEd! Making a variant of my puzzle

says, to me, that you liked mine. This makes me happy indeed.

I have a question about going through a line. Let's take the

line from (18,19)-(18,100), for example. Suppose, I'm at

(16,20) and I'm using a velocity vector of (3,-3). I will

end up at (19,17). There can be two interpretations:

1. If I draw a line between the points (16,20) and (19,17),

it will not intersect (18,19)-(18,100).

2. I could argue, I moved in the X-direction first, going

from (16,20) to (17,20) to (18,20) to (19,20) [thereby

crossing (18,19)-(18,100)], THEN moved in the Y-direction

from (19,20) to (19,19) to (19,18) to (19,17).

Which interpretation of crossing is valid?

Link to comment
Share on other sites

  • 0

Superprismatic, please forgive my unintentional rudeness :duh: for failing to express my enjoyment with your racing challenge. I DID INDEED like your challenge. :thumbsup:

I intend interpretation 1--If the line segment of the move does not intersect the line segment of the mark, it does not count as a traversal. So, the move from (16,20) to (19,17) does not round the mark from (18,19)to (18,100).

-----

Separate issue: Re-reading my verbose statement of the problem, I see that I made a confusing statement, corrected here:

You can specify an acceleration vector (a,b), where a and b can independently be selected from the set (-1,0,1).

Then it makes sense to say that you add the acceleration to the velocity in the first part of a move.

I made the edit fix in the original post -- SP

Edited by superprismatic
: Informative
Link to comment
Share on other sites

  • 0

  • x y vx vy

  • 0 0 1 1
  • 1 1 2 2
  • 3 3 3 3
  • 6 6 4 4
  • 10 10 3 4
  • 13 14 2 3
  • 15 17 2 2
  • 17 19 1 1
  • 18 20 1 0
  • 19 20 0 -1
  • 19 19 -1 -2
  • 18 17 -2 -3
  • 16 14 -2 -2
  • 14 12 -1 -1
  • 13 11 0 0
  • 13 11 1 1
  • 14 12 2 2
  • 16 14 3 3
  • 19 17 4 3
  • 23 20 5 2
  • 28 22 4 2
  • 32 24 3 1
  • 35 25 2 0
  • 37 25 1 -1
  • 38 24 0 -2
  • 38 22 -1 -3
  • 37 19 -2 -4
  • 35 15 -3 -5
  • 32 10 -4 -6
  • 28 4 -5 -5
  • 23 -1 -6 -4
  • 17 -5 -5 -3
  • 12 -8 -4 -2
  • 8 -10 -4 -1
  • 4 -11 -3 0
  • 1 -11 -2 1
  • -1 -10 -1 2
  • -2 -8 0 3
  • -2 -5 1 3
  • -1 -2 1 2
  • 0 0

I know it can be optimized. I don't know how to do better formatting in spoiler.

Link to comment
Share on other sites

  • 0

  • x y vx vy
    1. 0 0 1 1
    2. 1 1 2 2
    3. 3 3 3 3
    4. 6 6 4 4
    5. 10 10 3 4
    6. 13 14 2 3
    7. 15 17 2 2
    8. 17 19 1 1
    9. 18 20 1 0
    10. 19 20 0 -1
    11. 19 19 -1 -2
    12. 18 17 -2 -3
    13. 16 14 -2 -2
    14. 14 12 -1 -1
    15. 13 11 0 0
    16. 13 11 1 1
    17. 14 12 2 2
    18. 16 14 3 3
    19. 19 17 4 3
    20. 23 20 5 2
    21. 28 22 4 2
    22. 32 24 3 1
    23. 35 25 2 0
    24. 37 25 1 -1
    25. 38 24 0 -2
    26. 38 22 -1 -3
    27. 37 19 -2 -4
    28. 35 15 -3 -5
    29. 32 10 -4 -6
    30. 28 4 -5 -5
    31. 23 -1 -6 -4
    32. 17 -5 -5 -3
    33. 12 -8 -4 -2
    34. 8 -10 -4 -1
    35. 4 -11 -3 0
    36. 1 -11 -2 1
    37. -1 -10 -1 2
    38. -2 -8 0 3
    39. -2 -5 1 3
    40. -1 -2 1 2
    41. 0 0

    I know it can be optimized. I don't know how to do better formatting in spoiler.

The marks are crossed in following steps:

[*]1st mark (18, 19) - (18, 100)): Covered in steps 8-9-10 (increasing x)

[*]2nd mark (14, 13) - (14, -100)): Covered in steps 16-17-18 (increasing x)

[*]3rd mark (34, 24) - (34, 100)): Covered in steps 22-23 (increasing x)

[*]4th mark (30, 9) - (30, -100)): Covered in steps 29-30 (decreasing x)

[*]5th mark (0, 100) - (0, -100)): Covered in steps 36-37 (decreasing x)

Link to comment
Share on other sites

  • 0

intersecting the point (18,19) qualifies as crossing the line. So, a move from (13,18) to (23,20) qualifies.

Stopping on the point would qualify if both moves (it. the entering and leaving moves) move in the required X direction.

When I solved, I assumed it won't qualify. I think I can save at least 4-5 more steps now. :)

Link to comment
Share on other sites

  • 0

  • x y vx vy

  • 0 0 1 1
  • 1 1 2 2
  • 3 3 3 3
  • 6 6 4 4
  • 10 10 3 4
  • 13 14 3 3
  • 16 17 2 2
  • 18 19 1 1
  • 19 20 0 0
  • 19 20 -1 -1
  • 18 19 -2 -2
  • 16 17 -2 -2
  • 14 15 -1 -1
  • 13 14 0 -1
  • 13 13 1 0
  • 14 13 2 1
  • 16 14 3 2
  • 19 16 4 3
  • 23 19 5 3
  • 28 22 4 2
  • 32 24 3 1
  • 35 25 2 0
  • 37 25 1 -1
  • 38 24 0 -2
  • 38 22 -1 -3
  • 37 19 -2 -4
  • 35 15 -3 -5
  • 32 10 -4 -4
  • 28 6 -5 -3
  • 23 3 -6 -2
  • 17 1 -7 -1
  • 10 0 -8 0
  • 2 0 -7 0
  • -5 0

Crossing steps: Step 8, step 16, steps 21-22, steps 28-29, steps 33-34.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...