Space Invaders Automation

Back to General discussions forum

gardengnome     2023-10-08 19:23:42
User avatar

Quote: "In other words it is typical cartesian coordinate grid with origin at the cannon's rotation point."

Rodion, are you sure that y=0 is at the bottom and not at the top?

Rodion (admin)     2023-10-08 19:37:27
User avatar

Just a second, shall check!

UPD: Sorry, seemingly they were inverted (zero where aliens start at top) in browser animation while normal (zero where aliens reach bottom) in the checker. Please retry and thanks for help!

To clarify - in-browser code was fixed, while checker was not. (it is bad I failed to reuse the same code for both)

gardengnome     2023-10-08 20:07:53
User avatar

The coordinates work now as expected; many thanks! There might still be an issue at the end - I hope that's when you have passed the test :) (no way for me to tell): "Non-zero exit code! either you've broken something, or tell admin!"

Rodion (admin)     2023-10-08 20:09:49
User avatar

Yep, just spotted it myself. Please retry once more, your code seems perfect, unlike mine :)

The trouble is I was bit too reckless not to create winning code myself and ensure that the winning verdict is reported properly.

gardengnome     2023-10-08 20:17:47
User avatar

Hi Rodion, all working now, many thanks for the prompt response. This problem might be a good challenge - it's a lot of fun to see how your algorithm shoots all the aliens.

Rodion (admin)     2023-10-08 20:25:44
User avatar

Mathias, thanks a lot for proof-solving it!

it's a lot of fun to see how your algorithm shoots all the aliens.

as I haven't yet created any but two randomly shooting codes myself, it is mesmerizing to watch the work of your algorithm... like a movie :)

might be a good challenge

do you mean to convert it to "challenge" to compete who is most effective Earth-protector?

gardengnome     2023-10-08 20:31:06
User avatar

Yes I meant converting it to a challenge (with the current minimum pass requirement) but probably it's just fine as it is.

To all our fellow coders out there - give this task a go, I was suprised how much I enjoyed it (even though it's in Lua ;) ).

Rodion (admin)     2023-10-08 22:38:34
User avatar

Mathias, thanks for suggestion! Thought it over while running with the dog and now made appropriate modifications (with couple silly issues on the way, so re-check would be nice). Main question is what to use as a score, so we now allow the game to run up to 600 seconds (of alien time) or until 5 ships land - and the score is proportional to the time. Minimum accepted is 60 seconds as previously. Your current solution stands for about 140 seconds as of now.

Rodion (admin)     2023-10-11 22:11:40
User avatar

Oh, well. Just when I started to think whether this problem may be good to make small prize challenge of it, Mathias seemingly solved it completely :) Congratulations!

I tried myself a bit - most obvious improvement I still hadn't made is not to shoot one target more than once, I feel.

I'm curious whether it should be ok to publish screencasts or this will be too spoiling (probably not).

Please login and solve 5 problems to be able to post at forum