euclidthegame icon indicating copy to clipboard operation
euclidthegame copied to clipboard

Level 14: Can pass the level by just making a ray

Open Bocchio opened this issue 11 years ago • 10 comments

Apparently if you move the elements in enough to make the approximation better (by making the circle smaller), the game consider that a ray is in fact tangent. 2014-07-13-22 36 02

Bocchio avatar Jul 14 '14 18:07 Bocchio

Ouch! This actually "works". O_O

Nice find!

(I always thought problems like these would be avoided because of the way the game works internally, and because approximations like that really don't usually work.)

On Mon, Jul 14, 2014 at 2:53 PM, Bocchio [email protected] wrote:

Apparently if you move the elements in enough to make the approximation better (by making the circle smaller), the game consider that a ray is in fact tangent. [image: 2014-07-13-22 36 02] https://cloud.githubusercontent.com/assets/7820753/3575392/e1ee3c34-0b87-11e4-8ddf-6f848b37d1ff.png

— Reply to this email directly or view it on GitHub https://github.com/kasperpeulen/euclidthegame/issues/301.

Hexstream avatar Jul 14 '14 19:07 Hexstream

hm... will see if I can fix this

kasperpeulen avatar Jul 16 '14 09:07 kasperpeulen

I don’t know if this is something you can do with Geogebra, but one thought I had is that, whenever you create or move a free point, the game should randomly nudge it by some imperceptible amount, say up to a tenth of a pixel. I think that would effectively eliminate this class of bugs.

andersk avatar Jul 16 '14 22:07 andersk

Or maybe disallow creating new implicit points completely - if you need an explicit point - you can create it manually.

On 17 July 2014 00:08, Anders Kaseorg [email protected] wrote:

I don’t know if this is something you can do with Geogebra, but one thought I had is that, whenever you create or move a free point, the game should randomly nudge by some imperceptible amount, say up to a tenth of a pixel. I think that would effectively eliminate this class of bugs.

— Reply to this email directly or view it on GitHub https://github.com/kasperpeulen/euclidthegame/issues/301#issuecomment-49234507 .

pkundrat avatar Jul 17 '14 16:07 pkundrat

I don’t know if this is something you can do with Geogebra, but one thought I had is that, whenever you create or move a free point, the game should randomly nudge by some imperceptible amount, say up to a tenth of a pixel. I think that would effectively eliminate this class of bugs.

tried to implement this, I hope it didn't break anything

kasperpeulen avatar Jul 17 '14 22:07 kasperpeulen

Did you push this fix already? I see no new commits in the repository, and I’m still able to cheat level 13 in the way I described to you earlier.

andersk avatar Jul 18 '14 06:07 andersk

https://github.com/kasperpeulen/euclidthegame/commit/915e7ca4d202af0fa7c7cbdf0f639ee67f75b9d9#diff-a03b3a59b21ab1de4199e5fe63df92d2R46

this is the commit, I will look at this Level 13 cheat once again. Edit: Ah I see I've only did this for new free points, not yet for moving free points.

kasperpeulen avatar Jul 18 '14 09:07 kasperpeulen

Looks like it will need three improvements to be effective against my cheat:

  • It should also apply to points created on a line or circle, not just unconstrained points. I assume GeoGebra will take care of making sure they stay on their line or circle after being nudged.
  • It should also apply after points are moved, not just when they are initially created.
  • The displacement should be random, e.g. (Math.random() - 0.5)*0.002.

andersk avatar Jul 18 '14 10:07 andersk

Or, as an alternative to nudging each point as soon as it is moved: whenever the level becomes complete, you could nudge every movable point and check whether the level is still complete.

andersk avatar Jul 18 '14 10:07 andersk

@andersk yeah, that is probably better, I tried to nudging points as soon as they are moved, but it is hard, there is a function that check if a points position gets updated, but it doesn't check if the user or the program updates the point. So if the points get moved and after that I update the point, an infinite cycle is created.

kasperpeulen avatar Jul 18 '14 10:07 kasperpeulen