After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 535006 - when safe teleport is impossible, do NOT fall back on unsafe
when safe teleport is impossible, do NOT fall back on unsafe
Status: RESOLVED FIXED
Product: gnome-robots
Classification: Applications
Component: general
git master
Other All
: Normal minor
: ---
Assigned To: gnome-robots-maint
gnome-robots-maint
Depends on:
Blocks:
 
 
Reported: 2008-05-27 00:33 UTC by sds
Modified: 2014-06-21 15:24 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Disable safe teleport when out of safe teleports (3.62 KB, patch)
2014-06-21 15:24 UTC, Michael Catanzaro
committed Details | Review

Description sds 2008-05-27 00:33:02 UTC
currently, gnobots cycle to the level 1 from level 66 unconditionally, and when there are safe teleport spots are available on the board, an unsafe teleport is dome with, of course, disastrous results.
the correct, IMO, behaviour, is to cycle to level 1 when there are no safe teleport spots left on the board, not at an arbitrary level.

Other information:
when playing super-safe moves, it is NORMAL to cycle up to level 66.
being killed just because the random configuration at level 65 makes a safe teleport impossible is very frustrating.
being unable to reach level 70 is also frustrating.
Comment 1 Thomas Andersen 2009-03-26 00:22:39 UTC
Hi. I might have to ask you to clarify for me what this bug is about exactly? Are these two issues in one bug?

One thing we could perhaps improve is to make sure that there will always be at least one safe teleport available as the first move in a level. Would that help?

I'm not sure I understand what you mean with cycling to an arbitrary level?
Comment 2 sds 2009-03-26 02:05:30 UTC
the current behavior of gnobots is:

1. when level N is finished successfully, level Nmod66+1 is entered (i.e., level 66 --> level 1, thus level 67 is never reached)

2. when the player cannot be safely teleported, it is teleported unsafely and 
killed - even if he has safe teleports.

I consider both aspects of behavior wrong.

I propose the following modification which, IMO, fixes both aspects:

Always increment the level by 1, i.e., never go from N to 1, 
EXCEPT when a newly generated level does NOT offer any moves and any place to teleport to, i.e., if it is guaranteed that the next move kills the player.
In this case, if the player still has a safe teleport, it is used to teleport him to the level 1.
Comment 3 Thomas Andersen 2009-03-26 13:07:06 UTC
Thanks for making it more clear.

1) looks like this is pretty much what bug #405564 is about, right?

2) I think we should just make sure that there is always at least one safe teleport at the start of each level. We can just keep on randomizing the robot layout until there is.
Comment 4 sds 2009-03-26 13:42:05 UTC
1. indeed this is a dupe, sorry

2. I do NOT like your solution of making sure there is at least one safe teleport: as the levels grow beyond 67, you will need more and more random regenerations until you get the configuration with a safe teleport, until you reach a level when all the time is spent regenerating. You might want to start level generation with 2 empty 3x3 squares were robots are NOT randomly placed and the player is placed in the center of one of the squares. this will guarantee that the player has both an initial move and a safe teleport.
Comment 5 Thomas Andersen 2009-03-26 14:14:19 UTC
1) np

2) Well only 1 3x3 is needed. Robots can start right next to the player without problems. We just need one 3x3 (or bigger if it is a level with robots who move 2 squares) to jump to. But it quickly becomes a problem to make levels higher than lvl 67 as we run out of squares. I think that it is reasonable to just keep replaying lvl 67. That is, increment lvl count but keep difficulty of lvl 67.
Comment 6 sds 2009-03-26 15:29:50 UTC
well, I would rather guarantee that the player can make a move before he has to teleport.

also, I do not understand this:
"I think that it is reasonable to just keep replaying lvl 67. That is, increment lvl count but keep difficulty of lvl 67."
I want to increase the the level (and the number of slow and fast robots) until we run out of space, at which time cycle down to level 1, keeping the score.
Comment 7 Michael Catanzaro 2014-06-21 15:24:33 UTC
Let's use Bug #405564 for the end-game, level 66 behavior.

The following fix has been pushed:
108c7b0 Disable safe teleport when out of safe teleports
Comment 8 Michael Catanzaro 2014-06-21 15:24:36 UTC
Created attachment 278895 [details] [review]
Disable safe teleport when out of safe teleports

It's confusing that safe teleport falls back to random teleport when
you're out of safe teleports. Simply disable this action when no safe
teleports are remaining.