[Community Puzzle] Can you save the forest - Episode 2

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @chabes,validated by @Nagato_Uzumaki,@FalINTOblivion0112 and @RaulButuc.
If you have any issues, feel free to ping them.

Thanks for that contribution, I enjoyed solving it.

Trying to move on a square already occupied by a truck in (5,5) - replay

Where in the statement does it say that I’m not allowed to have 2 trucks at the same cell?

1 Like

I have reported it before puzzle was approved link

Indeed, I haven’t checked those comments before writing this post.

Pinging @chabes to add a note about 2 trucks on the same cell.

Thanks for the comment. My appologies Konstant for letting your own comment unread.
I changed the description on my local files. What is the way for updating it in codingame once a game has been approved ?

1 Like

The update process is exactly the same as it was before on the pending contribution. Click “Edit”, upload the new zip file, wait until it’s built and click “Save”.

So simple :wink:
I feared to do that in case it would reset the validation (during validation process it happened each time I did a tiny modification…)
Done !

2 Likes

I have reported that validation issue time ago link :smiley:

I passed the first 4 tests using beam search.
But for tests with more than 2 trucks, I have way too many possible actions combinations, hence too many nodes.

I would have loved to have more tests with only 1 or 2 trucks.
I do not know how to manage more trucks. Should I simulate them one by one?

Interesting puzzle, I really enjoy it. I am currently only at 87% because the last test seems a bit tricky: some truck needs to go around the lake left, other truck right.
I use beam search in turn #0.
If I set the beam width too low (10) then my code does not find the solution for this test case.
If I set the beam width much higher (2000), then my code finds the solution (testing it locally), but then on CG it timeouts for this and also for some other test cases.

Maybe my eval function used in the beam search is not good enough?
Did any of you who solved this need any special consideration for the last test case?