22
2
COMPLETE
Wumpus season has ended, and with, the lives of many a vicious Wumpus and brave Hunter. As well as some cowardly, immoral and downright stupid Hunters. But at the end of the day, NascarHunter by Dr Heckle came away with the most loot and glory. We salute you, oh brave... driver?
It's open season on Wumpuses, and hunters from around the world are flocking to the Wumpus Caves to try to get rich of off valuable Wumpus Pelts.
The Game
Based on the classic Hunt the Wumpus game, with a few variations.
The Map
A dodecahedron. There are 20 rooms, each connected to 3 other room, making basically 3 rings with bridges in between.
The Wumpus
The Wumpus is a mystical beast. None are sure what it looks like, but all agree that it is ferocious. The Wumpus lives in the caves, and likes to eat dead things. If there is a corpse in a cave next to the Wumpus, he will move there and eat it. If the Wumpus happens to move into a cave containing hunters, he will kill and eat them as well. If the Wumpus hears an arrow near him, he will panic and run into a random room.
Optional traits: These are currently included to make the game more interesting, but can be removed at popular request if they add too much randomness.
Enraged Wumpus: If the Wumpus is shot, he has a 20% of surviving and rampaging for 3 days. When rampaging, he will randomly move twice a day, but still be attracted to corpses. After 3 days, he will die. A second arrow shot will also kill the Wumpus.
Wandering Wumpus: Each day, if nothing else triggers the Wumpus, he has a 25% chance of moving.
The Hunters
Four hunters can enter the caves at a time. The caves are dark, so the hunters cannot see, but they can use their other senses. Hunters can smell the Wumpus in an adjacent room, smell a corpse in an adjacent room, hear other hunters moving in adjacent rooms, and hear if an arrow is shot into an adjacent room.
Hunters have two actions: Shoot or move. A hunter can shoot an arrow into an adjacent room or his own room, and move similarly.
Gameplay
In each round, hunters will first take note of their surroundings, and then make one move. Movement occurs before arrows, so if an arrow is shot into a room that a hunter is moving out of, the hunter will survive. After all hunter moves have been made, the arrows are evaluated. If a single occupant and arrow are in the same room, the occupant will be shot and die. If two or more occupants share a room, one will randomly be hit and die. Note: Corpses are occupants, so a dead body may serve as a partial shield.
After all hunter moves, the Wumpus will respond. If a hunter has moved into the room with the Wumpus, the Wumpus will eat him/her. If the Wumpus moves, it will also eat the occupants of the new room.
After 100 days, if the hunters have not killed the Wumpus, or fallen victim, they will die of starvation within the caves.
The Code
All source code can be found here. All submissions should be in Java, unless somebody wants to write me a stdIn/stdOut adaptor ;)
Bots should extend the Hunter class. To name your Hunter, add a constructor with no parameters that sets the name field. T o respond, override the getResponse function. In this function, each turn, you will be passed an array of 5 booleans that tells you about your surroundings.
status 0 = "You smell a wumpus"
status 1 = "You hear another hunter"
status 2 = "You smell a corpse"
status 3 = "You hear an arrow clatter"
status 4 = "You feel another hunter in the same room as you"
The Hunter class has 2 slots: nextMove and nextDirection, that use the enums Move and Direction respectively. Move can either be MOVE or SHOOT, direection can be LEFT, RIGHT, BACK, or HERE. Directions are consistent, meaning back will always return you to the previous room you were in, and if entering from the same room, LEFT and RIGHT will always be the same. However, if you enter from a different direction, LEFT and RIGHT will take you to different places.
Feel free to implement your own methods as well. Memory is persistent throughout the whole tournament, meaning your hunter will only be constructed once. However, at the start of each round, the newGame() method is called to let your hunter know a new game has started.
Scoring
Four hunters compete at a time. If killed, the Wumpus pelt is worth 60 points, split evenly among all surviving hunters. Full round robin style, so each combination of 4 hunters will play together.
5 sample Hunters are included: 4 with very basic functionality, and one that allows user input to play, for testing purposes.
If you have any suggestions/requests, please let me know!
The End is in sight!
The worlds Wumpus population is being hunted at an alarming rate. The Protect Our Wumpuses Act is expected to be passed on Wednesday, June 17th. After this date, no more hunters will be allowed in the caves, and a winner will be chosen.
Scoreboard
Note : My apologies, there was a bug in the code that could cause Hunters to stay dead through multiple games. Having fixed it, it does not change the overall rankings very much, but does largely change the stats.
Scores are in, running each set of hunter in 1000 games each. NascarHunter and FullCoverageHunter lead the pack, and although the addition of AntiHunter has given the Wumpuses a 2% survival boost, they are still shaking in their suckered feet at the 32% survival rate of their kind. Arrows from fellow hunters are more than ever the biggest threat in the caves.
1. NascarHunter : 16557175 (17.08)
2. FullCoverageHunter : 15195545 (15.68)
3. Trig : 14459385 (14.92)
4. Idomeneus : 13428570 (13.85)
5. Eats Shoots and Leaves : 12763945 (13.17)
6. WalkingIdiot : 12329610 (12.72)
7. NealHunter : 12287140 (12.68)
8. Unnamed : 11013720 (11.36)
9. MonsterHunter : 10686035 (11.02)
10. Pacer : 9187000 (9.48)
11. Badger : 9042570 (9.33)
12. Stay : 8721210 (9.0)
13. Emo Wumpus : 7831050 (8.08)
14. Paranoid : 7722965 (7.97)
15. Huddle : 7465420 (7.7)
16. ElmerFudd : 7245995 (7.47)
17. Laomedon : 6963845 (7.18)
18. Pacifist : 6944960 (7.16)
19. ScaredyCat : 6937370 (7.15)
20. Wumpus : 114170 (0.11)
Total rounds: 4845000
Humans killed by arrows: 5289674 (1.09)
Humans dead by starvation: 1046024 (0.21)
Humans killed by wumpus: 1887634 (0.38)
Wumpus victories: 1563372 (0.32)
1Can you hit another hunter with an arrow? – MegaTom – 2015-06-03T21:48:43.427
1Yessir, or yourself if you shoot an arrow at HERE – Cain – 2015-06-03T21:52:10.653
Are we allowed to examine the entire map when coming up with the move? Given that a hunter can get the current room and each room has pointers to its neighbors it should be possible to know where the wumpus and all other humans are. – Ralph Marshall – 2015-06-04T00:03:53.007
Room is actually not visible to anything that extends Hunter, because it's private not protected. So although your hunter contains a reference to the room it's in, it can't actually access it from code. So no, your hunter can't actually get the room, just the status update passed to it from getResponse – Cain – 2015-06-04T00:21:31.537
Is this by chance inspired by the Microsoft hunt the Wumpus competition? – Kyranstar – 2015-06-04T03:37:49.367
@Cain Can I submit more than one Hunter ? :p Also, tehre's a problem with your description. Room.getInfo() actually give an array of 5 boolean, not 4. The fifth one (index 4) is for when there is a Hunter in the same room as you. – Katenkyo – 2015-06-04T08:40:16.470
1Instead of an array for 5 booleans, why not just pass an
int
valued 0-31? We're big boys here, we can do bit operations :) – DoctorHeckle – 2015-06-04T14:05:43.3271@DoctorHeckle Sure we are, but it's still more dev-friendly to have an array rather than a single int ^^. – Katenkyo – 2015-06-04T14:49:37.717
More than one Hunter is fine, actually if you can create multiple hunters that work together, all the better. Just keep them with at least tangibly different logic. – Cain – 2015-06-04T15:01:48.040
@Cain No problem. And thanks, will try to work on multiple hunters :). By the way, there's a problem when you write the scores. The amount of human killed by arrows and the number of wumpus wins are false. You used a bad index :) Ho, and **** Trigger, he's winning the more points out of all the current submissions x) – Katenkyo – 2015-06-04T15:11:46.790
Haha also fixed the index while I was in there, I was getting more wumpus victories than games. The trend so far seems to be the more shooting the better haha, I was hoping a little altruism might pay off, but haven't seen it yet – Cain – 2015-06-04T16:07:38.723
Quick mechanics question for @Cain:
If I'm in the same room as a hunter, and Shoot.HERE, I'll kill them and not myself, correct? If there are more than one other hunters in the room, do I randomly kill another hunter?
If I enter a room with a corpse, and the Wumpus comes in, will the Wumpus eat me first, or go for the corpse?
Do stati 0, 2, and 3 refer to surrounding rooms AND the currently occupied room, or EXCLUSIVELY surrounding rooms?
@Katenkyo what's even more depressing is that RandomHunter seems to do just as well :( – euanjt – 2015-06-04T16:08:40.293
>
But for now, being in the same room = death, and corpses are permanent – Cain – 2015-06-04T16:10:55.047
Can you detect an arrow, a hunter, or a corpse in your own room? – feersum – 2015-06-04T16:16:02.267
1For arrows and corpses, if one is in the same room as you you get the same status as if it is adjacent. Hunters are the only ones you can distinguish between being next to the room or in the room. – Cain – 2015-06-04T19:17:00.777
@Cain The Wumpus with by starvation not because the number of days is too small, but because some entry don't move, and will never fight with the wumpus. And even when they move, if there is only 1 hunter remaining, there's a high chance he will never meet it. Anyway, I'm glad my MonsterHunter did 5/13 :D – Katenkyo – 2015-06-08T07:07:49.690
@ Katenkyo Yeah, you're right, especially because the Wumpus becomes mostly stationary after finding a corpse – Cain – 2015-06-08T18:19:24.280
Lots of competition! I dig it. For when Wumpus Season is over, I'd love to see which quartet is the most successful in addition to which individual hunter is most successful. – DoctorHeckle – 2015-06-08T20:26:38.383
Am I allowed to use a language that compiles to Java (e.g. Kotlin or Scala)? – kirbyfan64sos – 2015-06-09T20:25:40.103
If hunters are only constructed once and asked to reset each round, does that mean we can make a hunter that behaves differently depending on the round? Or do we have to reset everything each round? Basically, is it against the rules to carry over player state between rounds? – Stuntddude – 2015-06-12T04:51:56.537
Carrying over state between rounds is completely acceptable, just be aware that you may be with different hunters as well, and have no way of knowing this. – Cain – 2015-06-12T15:31:54.230
Well, was fun, I'm happy seeing MonsterHunter is 9/20 ! Well done for doing such a great KotH :). Do you think you'll do a variant of the wumpus hunt one day? By the way, Congratulations to @DoctorHeckle ! – Katenkyo – 2015-06-18T07:24:18.667
@Katenkyo Thanks! Yeah, I definitely might re-visit this someday, personally I felt like the game design partially failed, when a bot that didn't use any of the statuses for along time stil wrecked as hard as it did. Basically, shooting everywhere was too strong a strategy to reward anything more clever :P My goal would be to see people mapping the caves, setting corpse traps, triangulating the wumpus, etc. But I've got a very different KotH cooked up for next week ;) – Cain – 2015-06-18T16:00:10.787
Thanks much @Katenkyo! It appears that Occam's Razor was a little too sharp for this KotH. I'm gonna keep my eyes peeled for the next competition, @Cain. This one was a lot of fun! – DoctorHeckle – 2015-06-19T03:33:36.963