last day (20 days later) » 

3:49 PM
22
Q: Dollar Bill Auction

RamenChefThis is a KOTH challenge for the dollar bill auction game in game theory. In it, a dollar is being sold to the highest bidder. Bids go up in increments of 5ยข, and the loser also pays their bid. The idea is that both players escalate the bidding war far beyond the value of a dollar in order to cut...

 
ovs
If AnalystBot would play against himself, the program would fail with a java.lang.StackOverflowError as both opponents use their enemies bids to calculate their own bids.
 
@ovs didn't you read the comment?
 
Attempting to sabotage your opponent is explicitly allowed. How about attempting to sabotage the auction runner?
 
@PeterCooperJr. How do you plan to do that?
 
@RamenChef No specific plans yet, but I wanted to know before looking into some possibilities. Some sort of messing with the ClassLoader or SecurityManager before the auction runner does, or pausing/interrupting the main thread from some other thread within my bidder, or that sort of thing. No idea if any of that would actually work, I just didn't know if that sort of thing was (1) the point of the challenge, or (2) entirely against the spirit of the challenge.
 
3:49 PM
@RamenChef May a bot that causes the while-loop to loop infinite without giving an exception or error (except maybe OutOfMemoryError) compete, or does that fall under the "All methods should return in 500ms or less." rule? :) return Integer.MAX_VALUE; will always be larger than the opponent's bod, but won't break at next < bid1 + 5 because Integer.MAX_VALUE + 5 == Integer.MIN_VALUE + 4 (both -2147483644). The loop only breaks if the opponent also bids more than 10000.
 
I generally consider the runner to not be part of the challenge; simply an implementation of the spec, which is why I'm not going to allow sabotaging the runner.
 
New guy question - When and where will the results be posted?
 
How are you combining scores of different auctions? Why are you only playing 2 games against each other?
score should be private
This challenge is fundamentally vulnerable to One-Upping. Since I know the class of my opponent, it is easy to pick the best strategy against it. (Then somebody comes along, and can one-up my bot, etc)
 
@NathanMerrill 1) They're added together. 2) score can't be private because then the runner can't access it. 3) "Both bots bid over $100. If this happens, both bots pay $100, and neither bot gets the dollar."
 
@RamenChef 1). That needs to be in your spec. 2). Store the score outside of the player then (in a Map). Right now, players can modify it themselves. 3). Oh, I understand. I saw 10000, and assumed that was 10,000 dollars :)
 
3:49 PM
@NathanMerrill Players cannot modify those scores because score is package-protected.
 
Are they not allowed to be in the same package?
 
@NathanMerrill correct.
 
Can you specify that then? I don't see it in your code anywhere either.
 
can you consider randomizing class names to prevent things like the insider trading bot?
 
@Mendeleev Unfortunately, class names can't be changed at runtime.
 
3:49 PM
@RamenChef Not at runtime, but before the testcases are run, compile the classes with random names
 
this.tainted = instances++ != 0; Since this.instances is initialized to 0, isn't it tainted even if there is only 1, since 1 != 0?
 
@NoOneIsHere var++ returns the value, then increments.
 
@NathanMerrill really? I thought that was ++var. TIL
Is sabotaging like Darth Vader does legit? It seems like a jerk move, but idk.
 
I think this challenge itself is a dollar bill auction - as @NathanMerrill mentioned, you have to One-Up the existing answers. The question is, how much is an upvote worth?
 
I think the method nextBid is a bit of a confusing term for what it does. It's more of a raise / raiseTotalBid (to use Poker terms).
 
3:49 PM
@NoOneIsHere Darth Vader doesn't work.
@KevinCruijssen It's kinda too late to be changing the spec
 
For those looking to beat all of those reflection bots: Read your stack trace.
 
"Bids go up in increments of 5¢". You don't have anything in your code to validate this, though.. LuckyDiceBot for example bids in increments of 2-12 randomly..
 
@NathanMerrill or use static variables.
@KevinCruijssen lines 105 and 132.
 
@RamenChef that isn't reliable. You don't know who is reading you. The stack trace gives you that.
 
@NathanMerrill What do you mean by "who is reading you"? And how would the stack trace help?
 
3:49 PM
@RamenChef But what if a bot starts with 11? next = 11 and bid = 0, so next < bid + 5 will return false, even though it's an invalid bid of 11.
@NathanMerrill "For those looking to beat all of those reflection bots: Read your stack trace." But you already know your opponent in the newAuction method, so why would I check what my opponent is in the stack trace when I already know?
 
So is Darth Vader valid or not? I can't quite tell from the comments and I don't know Java
 
4:13 PM
@KevinCruijssen Why should that be an invalid bid?
@DJMcMayhem it's technically valid, but it doesn't work as it was probably intended. (It gets mysterious SecurityExceptions)
 
So it simply has a score of 0?
 
Yes.
 
4:50 PM
@RamenChef Your functions can be called at any time, by any other bot
which means that if I read my stack trace I know who is calling my functions
so, I can do different stuff based on my stack traces
the class passed into you is unreliable: It can be anything because you can't trust the source
 
5:03 PM
@RamenChef Hmm ok. So you must bid at least 5 higher, not in increments of 5?
 
@RamenChef have you ran the controller with the bots?
 
@KevinCruijssen correct.
 
typically, it's rather useful to post scores, errors, etc while the challenge is going
 
@NathanMerrill Not yet.
I was going to do that tonight.
 
ok. Your post said you were going to do it on the 24th, and I wanted to make sure that wasn't the first time you will run it
 
5:07 PM
Apparently when I test the runner with the example bots, GreedyBidder is on top.
 

  last day (20 days later) »