[Community Puzzle] Crop-Circles

I think something is incoherent.
For example in the HalfMoon test, the ‘j’ column should always show crop since it is right in the middle on the 2 circles.
The two centers are at same distance from this column.
So either the ‘jm’ point (for exemple) is touched by both circles, either it is touched by none.
In all case, the crop should appear.

However, the expected result is no crop for ‘jk’,‘jl’,‘jm’,‘jn’,‘jo’.
Since the instructions are sequential (I guess) this is inconsistant ; behavior is not the same for circle 1 and 2.

Hi Jelad –

Thanks for playing my puzzle.

This is Not one where a crop appears. This is all DESTRUCTIVE of the crops. I suggest you re-read the puzzle.

A spot may be destroyed twice; that is the same thing as being destroyed (aka mowed) once, or ten times.

Does that address your concern? If not, please post again.

Ok it works fine now ; I miss read a part of the instruction ; I tough the default action was reverse.
Thank you

1 Like

The aliens will never hire you full-time (LOL)

What kind of geometry were you learning in 4th grade?

1 Like

I liked the puzzle, but it took me a while to figure out which was the way to actually make a circle. I think the definition of circle should be more explicit in the problem text because it is not intuitive, even if it’s, I reckon, geometrically understandable.

For example, using Pitagora’s theorem to define the circle as every point with (distance <= diameter/2) from the center, in the case of a circle with diameter 3 and center ff you get as output this(a square):

Which in my opinion, is not close to a good circle definition.

Hello, I’d like some help. I’m stuck at the first test :

{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}
{}{}{}{}{}{}{}{}{}{}{}{}{}{}  {}{}{}{}
{}{}{}{}{}  {}{}{}{}{}{}          {}{}
{}{}{}          {}{}{}{}          {}{}
{}{}              {}{}              {}
{}{}              {}{}{}          {}{}
{}                  {}{}          {}{}
{}{}              {}{}{}{}{}  {}{}{}{}
{}{}              {}{}{}{}{}{}{}{}{}{}
{}{}{}          {}{}{}{}{}{}{}{}{}{}{}
{}{}{}{}{}  {}{}{}{}{}{}{}{}{}{}{}{}{}
{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}
{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}
{}{}{}{}{}{}{}{}{}{}{}  {}{}{}{}{}{}{}
{}{}{}{}{}{}{}{}              {}{}{}{}
{}{}{}{}{}{}{}                  {}{}{}
{}{}{}{}{}{}{}                  {}{}{}
{}{}{}{}{}{}{}                  {}{}{}
{}{}{}{}{}{}                      {}{}
{}{}{}{}{}{}{}                  {}{}{}
{}{}{}{}{}{}{}                  {}{}{}
{}{}{}{}{}{}{}                  {}{}{}
{}{}{}{}{}{}{}{}              {}{}{}{}
{}{}{}{}{}{}{}{}{}{}{}  {}{}{}{}{}{}{}
{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}```

If I understand correctly what I'm supposed to see, I'm missing a few points near the corners. 

My code looks like that :

> for i in range(radius+1):
>         for j in range(radius+1):
>             if i**2 + j**2 <= radius**2:
>                 min_line = max(0, center_line-i)
>                 max_line = min(24, center_line+i)
>                 min_col = max(0, center_col-j)
>                 max_col = min(18, center_col+j)
>                 edit_field(min_line, min_col)
>                 edit_field(min_line, max_col)
>                 edit_field(max_line, min_col)
>                 edit_field(max_line, max_col)

where field is defined like this : 
field = [["{}"]*19]*25

and edit_field is defined like this: 

> def edit_field(y, x):
>     line = field[y][:]
>     line[x] = "  "
>     field[y] = line[:]

I'd really appreciate a clue. Thank you

The radius appears to be incorrect. You might have used integer division instead of floating-point division when calculating the radius from the diameter.

Thank you, it did the trick beautifully !

Hello, I’d like a little extra help here (thanks again for the first answer). I’m stuck on test 4 Bull’s eye (and also on test 5). Here’s what I get with my program:

action = MOW, col = 9, line = 12, diameter = 31
action = PLANTMOW, col = 9, line = 12, diameter = 27
action = PLANTMOW, col = 9, line = 12, diameter = 23
action = PLANTMOW, col = 9, line = 12, diameter = 19
action = PLANTMOW, col = 9, line = 12, diameter = 15
action = PLANTMOW, col = 9, line = 12, diameter = 11
action = PLANTMOW, col = 9, line = 12, diameter = 7
action = PLANTMOW, col = 9, line = 12, diameter = 1

` {}{}{} {}{}{} ’
’ {}{}{}{} {}{}{}{} ’
‘{}{}{}{} {}{}{}{}’
’ {} {}{}{}{}{}{}{} {} ’
’ {}{}{}{}{}{}{}{}{}{}{} ’
’ {}{}{}{} {}{}{}{} ’
‘{} {}{}{} {}{}{} {}’
’ {}{}{} {}{}{}{}{} {}{}{} ’
’ {}{} {}{}{}{}{}{}{} {}{} ’
‘{}{}{} {}{}{} {}{}{} {}{}{}’
‘{}{} {}{}{} {}{}{} {}{}’
‘{}{} {}{} {}{} {}{}’
‘{}{} {}{} {} {}{} {}{}’
‘{}{} {}{} {}{} {}{}’
‘{}{} {}{}{} {}{}{} {}{}’
‘{}{}{} {}{}{} {}{}{} {}{}{}’
’ {}{} {}{}{}{}{}{}{} {}{} ’
’ {}{}{} {}{}{}{}{} {}{}{} ’
‘{} {}{}{} {}{}{} {}’
’ {}{}{}{} {}{}{}{} ’
’ {}{}{}{}{}{}{}{}{}{}{} ’
’ {} {}{}{}{}{}{}{} {} ’
‘{}{}{}{} {}{}{}{}’
’ {}{}{}{} {}{}{}{} ’
’ {}{}{} {}{}{} ’
Échec
Trouvé : {}{}{} {}{}{}
Attendu : {}{}{}{}{}{}{}{}{}{}{}{}{}

I guess there’s something wrong with my way of dealing with plantmow, but I’m out of ideas. Thanks in advance.

Your program parses the instructions correctly. However, the output is a bit difficult to read. Could you format the output as preformatted text?

Haha sorry about that. Here’s my second attempt

      {}{}{}              {}{}{}      
    {}{}{}{}              {}{}{}{}    
{}{}{}{}                      {}{}{}{}
  {}        {}{}{}{}{}{}{}        {}  
        {}{}{}{}{}{}{}{}{}{}{}        
      {}{}{}{}          {}{}{}{}      
{}  {}{}{}                  {}{}{}  {}
  {}{}{}      {}{}{}{}{}      {}{}{}  
  {}{}      {}{}{}{}{}{}{}      {}{}  
{}{}{}    {}{}{}      {}{}{}    {}{}{}
{}{}    {}{}{}          {}{}{}    {}{}
{}{}    {}{}              {}{}    {}{}
{}{}    {}{}      {}      {}{}    {}{}
{}{}    {}{}              {}{}    {}{}
{}{}    {}{}{}          {}{}{}    {}{}
{}{}{}    {}{}{}      {}{}{}    {}{}{}
  {}{}      {}{}{}{}{}{}{}      {}{}  
  {}{}{}      {}{}{}{}{}      {}{}{}  
{}  {}{}{}                  {}{}{}  {}
      {}{}{}{}          {}{}{}{}      
        {}{}{}{}{}{}{}{}{}{}{}        
  {}        {}{}{}{}{}{}{}        {}  
{}{}{}{}                      {}{}{}{}
    {}{}{}{}              {}{}{}{}    
      {}{}{}              {}{}{}      
Échec
Trouvé :       {}{}{}              {}{}{}      
Attendu :       {}{}{}{}{}{}{}{}{}{}{}{}{}

When trying to edit a spot that is out of range (e.g. when center_line-i, center_col-j is -1, 1), your code edits some other spot on the field boundary (in this case 0, 1) instead of skipping this spot.

Thank you very much, I’ll improve that tomorrow.
Regards

It worked ! Thank you very much.