corewar / corewar

Typescript implementation of red code parser and core simulator for the classic game Corewar
MIT License
45 stars 3 forks source link

How does scoring work? #65

Closed dougajmcdonald closed 6 years ago

dougajmcdonald commented 6 years ago

I'm a little unsure of the end conditions or how scoring works, can we run through this at some point?

gareththegeek commented 6 years ago

The game ends when only one warrior has any active tasks or a time limit is reached. There is an EndCondition class in the simulator which should demonstrate this. If the time limit is reached the game is a draw. Usually multiple rounds are played and points are awarded for wind and draws.

dougajmcdonald commented 6 years ago

Yeah, sorry I meant more specifically how the points are awarded.

I've seen some things online with %'s and things so was wondered how you score a program vs other programs in hills and things

gareththegeek commented 6 years ago

"There are two styles of KotH tournaments, "classical" and "multi-warrior". The "classical" KotH is a one-on-one tournament, that is your warrior will play 100 battles against each of the 20 other programs currently on the Hill. You receive 3 points for each win and 1 point for each tie. (The existing programs do not replay each other, but their previous battles are recalled.) All scores are updated to reflect your battles and all 21 programs are ranked from high to low. If you are number 21 you are pushed off the Hill, if you are higher than 21 someone else is pushed off."

http://www.koth.org/info/corewar-faq-.html

dougajmcdonald commented 6 years ago

Excellent, thanks. I wanted to get this info so I could start thinking about how the hills would work

gareththegeek commented 6 years ago

Scoring implemented in #186 - take percentage of wins * 3 + percentage draws