Live data from Hacker News

We rebuilt Corewars and used it to teach Computer Science students in India

adinocap.com

1–10 of 38 posts

Re: We rebuilt Corewars and used it to teach Computer Science students in India

#2
I love your story and am glad to see the next generation of computer scientists thinking about education. It's a huge problem that is nowhere close to solved. I worked as a founder in the ed tech space for around six years and sold two profitable companies, so hopefully I can give you some insight after checking out the actual game.

I really think you need to introduce each concept sequentially with periodic reinforcement, as it is impractical to expect any student at any level of education to read through an entire embedded Google Doc with instructions before playing the game. I sincerely believe you could take this concept to an actual product if you work on the engagement and adaptive learning aspects.

Just to get this out and validate the concept is an achievement in itself. I worked on all kinds of failed prototypes before finding one that worked. I am sure you guys are going to do great things!

Re: We rebuilt Corewars and used it to teach Computer Science students in India

#3
> we decided to move forwards with a game based software that:

> Would have a low ‘barrier of entry’

> Be easy for students from any background to pick up

> Be visual and simplistic to wrap your head around

> Have some level of a competitive / addictive nature and well defined metrics of success

...

> ... For the frontend, we had to create a clear visualization of what the processes were doing, and also had to build a UI that allowed for intuitively creating programs in Redcode. The latter was especially important for us as the goal for this project was to require as little technical experience as possible, and we also knew that Corewars was a challenging game.

This sounds like a typical case of listing your requirements (low barrier to entry, easy to pick up, simplistic to wrap your head around), but picking something that doesn't satisfy those requirements (a challenging game) while thinking that you can make it work somehow (build a UI to make it more intuitive).

I'm not surprised they ran into a problem with that approach.

> ... Before deployment, we’d assumed that Corewars could be learned and played by students at a semi-competitive level within a sitting. Even with the beginner mode that featured a scoped back set of assembly commands and high visibility into the game’s processes, it took Adi an hour and a half of 1:1 teaching time within the groups to get them comfortable with the game. We can estimate from this testing it would take students ~3 hours to learn the game individually, and another ~3-4 hours of logical challenge questions to get to a competitive level.

(I think those numbers are more likely to be underestimates, except for students with a lot of prior knowledge.)

My high school CS teacher assigned writing a Corewars interpreter as a project, likely because he thought it would be a fun way to expose his students to assembly language. I did enjoy it, but most other students were already pretty lost just trying to understand how programs were executing in the reference implementation, let alone writing their own interpreter.

I think something like AntMe ( http://wiki.antme.net/en/Main_Page ) would've been a better choice of programming game (I only have experience with the two my CS teacher tried on his students, so it's likely I'm missing something better): the game world is an abstraction of physical reality, so it's not hard to visualize, and there's a variety of tasks of different complexity (from just making the ants walk around like LOGO turtles, to foraging for food, to waging war against other ant colonies).

Re: We rebuilt Corewars and used it to teach Computer Science students in India

#4
> Corewars proved itself really, really hard. Learning the assembly commands and how they edited the A and B values of each memory cell, understanding how the processes were executed and how data was stored was incredibly challenging for students to wrap their heads around.

This surprised me. I wrote a Corewars system in compiled Basic for the Sinclair QL when the game became popular. Writing it was not particularly difficult and the toy machine code was very simple. Maybe it was the context: we were used to look at bits and assembly instructions, we're not anymore.

Re: We rebuilt Corewars and used it to teach Computer Science students in India

#6
I injured myself ~20 years ago because of Corewars (well mostly stupidity, but Corewars was involved).

I wrote a little evolution routine that would take some corewars code and randomly change instructions around to see if it couldn't evolve a more successful program this way.

I let it run for hours and hours, and it did come up with short programs, and I was eager to see how it would continue. It happened that I needed to install a new light fixture in the same room as the computer... can you see where this is going?

Well, I didn't want to turn off the simulation, so I figured that if I instead just turn off the lights, then even without flipping the breaker for that room, I could be sure there would be no live wires leading to my new light fixture.

I was standing on a long stool and was about to start screwing in the light fixture to the ceiling wires with a lustre terminal and bam, I was hit with 220 volts.

I thought the only outcomes from getting electrocuted would be to either die or survive, but I discovered a third thing that can happen: I lost a bunch of color in my skin, and it never came back.

Lessons? Be careful with electricity, and try not to get too obsessed with Corewars.

Re: We rebuilt Corewars and used it to teach Computer Science students in India

#7
Corewars, the Redcode programming game, is still around and active.

There are on-going tournaments ("hills") of which my favourite is the 94nop hill ('94 rules, without pspace).

http://www.koth.org/lcgi-bin/current.pl?hill94nop

It has been in action for approximately 25 years.

Some reference sites: https://corewar.co.uk/

And warrior library: https://users.obs.carnegiescience.edu/birk/COREWAR/corewar.h...

Re: We rebuilt Corewars and used it to teach Computer Science students in India

#8
post #6

I injured myself ~20 years ago because of Corewars (well mostly stupidity, but Corewars was involved). I wrote a little evolution routine that would take some corewars code and randomly change instructions around to see if it couldn't evolve a more successful program this way. I let it run for hours and hours, and it did come up with short programs, and I was eager to see how it would continue. It happened that I nee…

Alternative lessons:

1. Save your progress to disk periodically -- for a genetic algorithm, that will be the seeds passed to the next generation. That way, you'll only lose one generation if you need to unplug your box. As a programmer who does any amount of research, this is a superpower. Godliness is achieved when you automatically commit this data, summary metrics, and the code that generates it into a git repo.

2. Invest in a UPS. If you need to do a project that will take longer than your UPS will last, you can just move the box & UPS onto another circuit.

But, yes, be careful with electricity. Lessons from my grandpa, who survived all of his live-circuit edits and died of lung cancer:

3. Wear rubber-soled boots.

4. Keep one hand behind your back.

5. Use rubber-handled tools and do not touch the metal bits.

6. If a ladder is necessary, it should be non-conductive.

7. Equip your child with a 2x4 and give them the instructions to pry you away from the source of electricity with that, and to not touch you under any circumstances.

Re: We rebuilt Corewars and used it to teach Computer Science students in India

#9
post #3

> we decided to move forwards with a game based software that: > Would have a low ‘barrier of entry’ > Be easy for students from any background to pick up > Be visual and simplistic to wrap your head around > Have some level of a competitive / addictive nature and well defined metrics of success ... > ... For the frontend, we had to create a clear visualization of what the processes were doing, and also had to build…

First - I strongly agree with everything you said. It's a steep learning curve to climb for something that doesn't really relate to any prior computing experience a typical student could be expected to have today.

The teaching time will go down if they stick with this - they'll learn what the common errors are, what the common conceptual misunderstandings are, and how best to present the material to their students. The 1 on 1 tutoring they did this quarter (hopefully) will have given them a lot of insight into what the student experience is like.

It looks like they mostly learned a lot about teaching, and how their educational system in particular works. If they're hoping to keep working in the educational space these two things alone will make their time worthwhile.

Anyways, it's a really interesting article by people who are both passionate about and new to teaching - it's a fun read.

Re: We rebuilt Corewars and used it to teach Computer Science students in India

#10
post #8
post #6

I injured myself ~20 years ago because of Corewars (well mostly stupidity, but Corewars was involved). I wrote a little evolution routine that would take some corewars code and randomly change instructions around to see if it couldn't evolve a more successful program this way. I let it run for hours and hours, and it did come up with short programs, and I was eager to see how it would continue. It happened that I nee…

Alternative lessons: 1. Save your progress to disk periodically -- for a genetic algorithm, that will be the seeds passed to the next generation. That way, you'll only lose one generation if you need to unplug your box. As a programmer who does any amount of research, this is a superpower. Godliness is achieved when you automatically commit this data, summary metrics, and the code that generates it into a git repo. 2…

You missed the most important safety precaution.

0. Get a non-contact voltage tester. Always assume mains wiring is dangerous, unless it has been checked. And always assume the voltage tester is lying to you, unless you've verified it at a known live wire at the beginning of your work.

The final event that led to the accident was,

> so I figured that if I instead just turn off the lights, then even without flipping the breaker for that room

If a non-contact voltage tester was used, it could be prevented.

Turning off the light switch without flipping the breaker can be safe if there's no energized wires nearby and no miswiring.

Post reply on HN