37
8
It's my 17th birthday and you're invited to my party!
And as always at parties, there will be cake.
One cake...
And you need as much of it as possible.
As this is a fair party, each of us will say how much of my cake we want and the person who said the smallest amount will get it. Then everyone else gets to repeat the process until the cake is gone.
Challenge
- Given the input through command line arguments in the form of
total-degrees degrees-left total-people people-left
, output to standard outputinteger-bid-in-degrees
. - If your bid was the lowest, you receive that amount of cake and are out for the round.
- If your bid wasn't lowest, your bot gets to bid on the remaining cake.
- In the case that the lowest bids are the same, the person removed will be chosen at random.
- At the end of a round, once all the cake is gone or there is nobody left to bid on it, the person with the most cake wins!
- In the case at the end of a round and two people have the same sized biggest slice, the winner is chosen at random from the drawing entries.
Gameplay
- There will be 17 rounds, the overall winner will be the entry with the most wins overall.
- In the case of a draw, rounds will be played until there is a clear winner.
- Each day, I will update the current scores so that people can upgrade their entry.
Submission
You should write your entry as
Bot Name, Language
Insert Code Here
Explanation/Random stuff here
If your entry isn't formatted in this way, the controller will NOT be able to run your entry. If I find this has happened to your entry, I will either notify you in a comment, and/or edit the answer into the correct format.
Your entry and file storage
- Your bot may store files in the
./data/
directory and nowhere else.- Not required but please store your files as
botname*
- You may not write files in this format if
botname
is not your entries name. - This means you are allowed to overwrite other files you find that don't appear in this format. You shouldn't do this deliberately, please be sporting.
- Your bot must not assume that the files it requires are present but it can assume
./data/
exists. - This is because I occasionally wipe the
./data
directory, I will do this when the rounds actually start. (But not between them)
- Not required but please store your files as
- Your bot may not delete files at all
- Your bot is only allowed to read files in the
./data/
directory- This means you may look at other entries files
Results:
Meek won the contest! Well done @Cabbie407
And now for some random stats:
A list of positions each bot came in: (Well done to any bot appearing in this list, you came in the top 5 at least once!)
Meek, Meek, Eidetic, Eidetic, Meek, Eidetic, Eidetic, Meek, Meek, Meek, Saucy, Meek, Givemethecake, Givemethecake, Givemethecake, Meek, Eidetic
Eidetic, Eidetic, Meek, AlCakeSurfer, Eidetic, AlCakeSurfer, Meek, MyFairPlusAThird, Eidetic, Eidetic, Eidetic, Eidetic, MyFairPlusAThird, MyFairPlusAThird, Meek, MyFairPlusAThird, AlCakeSurfer
Reallythecake, AlCakeSurfer, AlCakeSurfer, Meek, AlCakeSurfer, Meek, AlCakeSurfer, AlCakeSurfer, Reallythecake, AlCakeSurfer, Meek, MyFairPlusAThird, Eidetic, Eidetic, Eidetic, Eidetic, Reallythecake
AlCakeSurfer, Reallythecake, MyFairPlusAThird, MyFairPlusAThird, MyFairPlusAThird, MyFairPlusAThird, MyFairPlusAThird, Eidetic, AlCakeSurfer, MyFairPlusAThird, MyFairPlusAThird, Relinquisher, Relinquisher, bill, bill, Relinquisher, MyFairPlusAThird
bill, MyFairPlusAThird, bill, bill, bill, bill, Relinquisher, Relinquisher, MyFairPlusAThird, Relinquisher, bill, Reallythecake, bill, ALittleOffTheTop, ALittleOffTheTop, bill, bill
The full log file for the cometition whilst running can be found here. Sorry about the format change partway through.
I will not be running the contest again, if you want to post more entries, you're welcome to do so, the controller can be found on my github repo for this contest.
1
In case you think that the algorithm boils down to
– Blue – 2015-10-05T07:58:31.987ceil(degrees/people)
, please see the contests sandbox entry here http://meta.codegolf.stackexchange.com/a/7095/32686.Can we save information to a file? – TheNumberOne – 2015-10-05T13:05:28.010
Sure as long as it puts it in the directory ./data/ (Also, the controller doesn't scrape, I do that manuallyish) – Blue – 2015-10-05T13:07:38.307
How long is the contest open? – recursive – 2015-10-05T15:37:37.537
10I request a ring cut around the outside perimeter. Technically 0 degrees (the cake still has 360 degrees when I'm done, after all) and I get all the side icing. – Random832 – 2015-10-05T17:49:01.610
10Happy Birthday :) – TheNumberOne – 2015-10-05T19:33:56.317
Link to controller? – TheNumberOne – 2015-10-05T19:53:58.723
2Results for one round if anyone's interested,
{u'StatelyImitator': 719, u'Dieter': 4, u'Reallythecake': 0, u'Greedy': 0, u'Meek': 2, u'FlamingChainsaw': 0, u'Slim': 0, u'CharityBot': 0, u'Gentleman': 297, u'ALittleOffTheTop': 256, u'EatThe\u03c0': 0, u'Pig': 0, u'CakeEater': 330, u'BobBarker': 0, u'FloorBot': 5, u'Fatbot5000': 296, u'Moses': 360, u'Magician': 720, u'Hungry': 257, u'Imitator': 354} [u'Magician']
. If your bot has a score of 0, it's doing something wrong. – Blue – 2015-10-05T20:11:46.133@TheNumberOne Link to controller and answer puller (no they're not very pretty) https://github.com/muddyfish/cake-cutting-contest
– Blue – 2015-10-05T20:30:25.520How many degrees of cake did that round start with? Adding it all up, I get 3303. – ETHproductions – 2015-10-05T21:00:14.937
3600, no, I'm not sure what happened there. I have checked the recent logs and they seem right. I won't be looking at this more until tomorrow, sorry if any issues arise. – Blue – 2015-10-05T21:03:06.443
I get 3600 for the sum. 719+4+0+0+2+0+0+0+297+256+0+0+330+0+5+296+360+720+257+354=3600 – Cabbie407 – 2015-10-05T21:37:45.313
Well, maybe I missed some. I was just doing a quick calculation on my tablet. But Slim and Flaming Chainsaw (and a few others) are not going to win by any stretch. ;) – ETHproductions – 2015-10-05T21:48:39.327
You don't say? I think Magician will win. – Blue – 2015-10-05T21:50:07.597
It would've, if it hadn't been changed... – ETHproductions – 2015-10-05T21:51:57.337
At some point, statelyimitator was winning with other 1/3 of the cake! – Blue – 2015-10-05T21:54:44.123
Happy my bot fails gracefully when faced with magically created cake. – histocrat – 2015-10-05T22:18:07.533
Can't wait to see how my bots do next time the controller is run :) This is an awesome AI experimentation challenge! – ETHproductions – 2015-10-05T23:24:38.220
1Well, here is another set of results
{u'Reallythecake': 376, u'FlamingChainsaw': 0, u'Gentleman': 227, u'EatThe\u03c0': 0, u'Relinquisher': 0, u'CakeEater': 282, u'Imitator': 34, u'Moses': 243, u'StatelyImitator': 485, u'Greedy': 5, u'ALittleOffTheTop': 211, u'Fatbot5000': 372, u'Magician': 720, u'Meek': 226, u'CharityBot': 0, u'Hungry': 212, u'Impatient': 0, u'FloorBot': 0, u'Dieter': 4, u'Fair': 0, u'Slim': 0, u'Pig': 0, u'BobBarker': 203} [u'Magician']
– Blue – 2015-10-05T23:41:14.687That's weird, both of mine got 0. I wonder what went wrong? – ETHproductions – 2015-10-05T23:42:56.627
Just checking now in case it's something I did wrong – Blue – 2015-10-05T23:44:12.553
If you've generated debug info, such as how much each bot bidded for each time around, that might be useful. – ETHproductions – 2015-10-05T23:45:08.637
Yeah I have that. You want it? If so how? – Blue – 2015-10-05T23:46:04.560
Upload to GitHub, maybe? – ETHproductions – 2015-10-05T23:47:07.377
Log file (log.log) is on the repo – Blue – 2015-10-05T23:52:14.707
OK, fixed a bug where the controller gave the current number of people for both args – Blue – 2015-10-05T23:59:02.393
@muddyfish Can you push the bugfix to github? – TheNumberOne – 2015-10-06T12:54:42.177
@muddyfish Could you update the GitHub repository to the same code which produced the log file, please? It seems your script is invoking Node.js wrong. – Toothbrush – 2015-10-06T14:39:31.527
1How was there 3600 degrees of cake per round? Your challenge explicitly states
One cake
, so the maximum should be 360? Is there more than one cake? – AdmBorkBork – 2015-10-06T15:17:01.240I just noticed that in the debug file, Relinquisher bid for the entire cake every time. Was this due to the bug you fixed? – ETHproductions – 2015-10-06T15:27:52.647
@TimmyD could be a tiered cake. Or have strange fractal geometries. – histocrat – 2015-10-06T15:31:30.620
@toothbrush The reason that node.js isn't working is because I've never used it and am probably going to look up a way to run it tomorrow unless someone does a pull request on how to fix it as well as installation instructions for me :) Also, pushed bugfix – Blue – 2015-10-06T15:51:01.703
"There will be 17 rounds, the overall winner will be the entry with the most wins overall."
But, you can only "win" once, right? Then you're out of the game. – Jasmine – 2015-10-06T19:50:19.923
I mean the controller will run a full game 17 times – Blue – 2015-10-06T20:06:12.923
3Please format the leaderboard in a more reader-friendly manner. – SuperJedi224 – 2015-10-07T01:24:47.510
Muddyfish, initially mybot showed the score of 0, but now its not in the list why – Kishan Kumar – 2015-10-07T04:19:23.410
When will this actually start and how long will the interval between the rounds be to tune the robot? Just asking, because I don't have too much time at the moment. – Cabbie407 – 2015-10-07T05:20:54.107
@superjedi you're welcome to edit the question if you want. Kishan Kumar, your bot takes input from stdin rather than argv, I was pretty sure I had already commented but I guess I forgot. Cabbie, I haven't decided yet. – Blue – 2015-10-07T05:47:02.177
@muddyfish now my bot takes input from argv. – Kishan Kumar – 2015-10-07T11:42:52.220
@TimmyD There is only one cake, I'm just using a very weird measurement where the are 3600 degrees in a circle (think gradians weird) – Blue – 2015-10-07T17:18:43.587
2@muddyfish gradians? Much more like cakeians, right? – Jan – 2015-10-07T23:04:50.490
Can we access the internet? – Beta Decay – 2015-10-08T06:00:38.750
@muddyfish can you please add the time in the log file. And I couldn't find all the bidding of my bot. – Kishan Kumar – 2015-10-08T06:06:28.470
No, you can't access the internet (yes, I can see that it would be useful), by time, dou you mean the actual times? Bot's aren't allowed to look in the log files. – Blue – 2015-10-08T10:17:02.117
1@muddyfish I m not able to see all my biddings in the log.log file – Kishan Kumar – 2015-10-08T11:56:44.663
I spent a while trying to code one in Piet, but the lack of decimals makes it too hard :( – Domino – 2015-10-08T19:34:57.627
@muddyfish how much time will be between your announcing of when the challenge starts and the actual start? Will it be like 'okay, starting now!' or will you announce 'challenge starts tomorrow!'? I would love to enter another bot, but I still need to get the weighting function sorted … – Jan – 2015-10-08T20:36:34.300
Yes I restarted the contest because I realised the way I was starting it overwrote the log file the website reads from. Sorry! – Blue – 2015-10-16T11:30:09.853
What happened there? Log overflow? Okay... I thought it stopped. Nevermind. – Cabbie407 – 2015-10-16T17:21:02.063
I updated the site server so it has 2 log files that you can look at. the second one hasn't been cleaned in ages so it has lots of non-contest data in it – Blue – 2015-10-16T17:36:03.343
1Hooray, Relinquisher managed to come in 4th and 5th a few times, and consistently scored 1700+! :) Thanks for this awesome experiment! – ETHproductions – 2015-10-17T17:57:00.800
2That was certainly a fun contest! – Jan – 2015-10-17T18:20:52.007