[Community Puzzle] FireControl

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @ZXC01,validated by @Quidome,@Blabbage and @FredericLocquet.
If you have any issues, feel free to ping them.

There is a typo: if there is no fire, output: ‘RELAX.’

I wish all symbols used in the map are explained.

Tree

After cutting down a tree will it change into ‘=’?
= Cut-down tree
Is cut down tree like regular tree helping to spread fire? Or is it a fire-blocker? Is it just like an empty space?
o Empty space
Is there any difference with ‘=’ ? If there is no difference, no need to create two symbols.

The decision logic can be further explained too.

If there is a fire but will not spread, and will eventually die out by itself, should the decision be “RELAX” or “JUST RUN”?

If there is one tree next to a fire, and it is the one and only one tree in the map, should the decision be “RELAX” or “JUST RUN” ?

Right thanks i will try to improve on that.

1 Like

= Cut-down tree
Is cut down tree like regular tree helping to spread fire? Or is it a fire-blocker? Is it just like an empty space?
for this, it is actually stated: To stop the fire, you need to remove two layers of trees.
o Empty space
Is there any difference with ‘=’ ? If there is no difference, no need to create two symbols.
for this, i was planning on a fire control 2, to make use of that!
for the decicion part:
If there are no trees that can be saved by blocking the fire, output: ‘{{JUST RUN}}’.
if there is no fire, output: ‘{{RELAX}}’.
so as long as there is fire, you should run and there is no fire, you can relax.

Sry i dont understand where the typo is…

With dot at the end the aswer is wrong.

Thanks leme check!

I don’t find why all tests were OK in IDE, but a validator failed (False alarm2 08).
Maybe is due to my understanding of spaces.

Is the Empty space considered as a cut-down tree to block the fire (so considered as a layer)?

If not, are two layers of removed trees have to be adjacent ?

I try empty space as a cut-down tree, and as a layer to add, but nothing works to pass the validator.

Is your code able to handle a case where only cut-down trees and empty spaces exist?

Thank you for your question.
I made more tests and I found the problem:
If there are no trees that can be saved by blocking the fire, output: ‘JUST RUN’. => need fire to run.
If no tree, but no fire, it’s relax too.
And to answer my own question, it seems Empty spaces are managed as Cut-down tree

Another problem that is so poorly-worded, following should be described clearly:

Does cut-down tree (=) serve as a fire-blocker ? (NO)

Does cut-down tree (=) serve as part of the 2-layer tree ? (YES)

So, we can understood it as = is treated the same as an empty space (o)

Based on wording of description, the behavior of fire spreading is understood as follows:

# # #
 ###
##*##
 ###
# # #  

Instead, it is as follows, which can only be inferred through the example…

#####
#####
##*##
#####
#####  

I’ve changed this part:

Fire can spread sideways as well as diagonally.
To stop the fire, you need to remove two layers of trees.

to:

Fire can spread sideways as well as diagonally, and continue to spread until it is stopped.
To stop the fire, it must be surrounded by two layers of non-flammable space, consisting of either cut-down trees or empty space.

I think the behavior of fire spreading is still not described accurately, maybe the following would help:

Fire spreads from any burning cell to all other cells within a Chebyshev distance of 2, regardless of whether the movement is purely vertical, horizontal, or diagonal.

In simpler terms:

  • From any fire cell, fire can spread to any cell that is at most 2 steps away in any direction (including diagonals).

Also, I think the 2nd sentence adds more confusion now, since trees (not cut-down ones) also contribute as part of a layer to stop the fire from spreading. I think a side-note for the statement in my previous comment could be added to prevent confusion instead.

I don’t agree. Please read the revised statement carefully again, or give me an example case where the revised statement still fails to address correctly.

There are two comments on the puzzle:

  1. Why is the size chosen so small (6x6)?
  2. My opinion is that the puzzle is not logically correct (using the Random Centre test as an example): we are given a plot of land where there are objects, we do not know what is beyond this plot, and then a logical question arises: why cut down trees that are in the fire zone, but they do not touch the potentially saved trees?