Quantcast
Channel: Dollar Bill Auction - Code Golf Stack Exchange
Browsing latest articles
Browse All 31 View Live
โ†ง

Answer by user100443 for Dollar Bill Auction

TimeRandBotimport net.ramenchef.dollarauction.DollarBidder;public class TimeRandBot extends DollarBidder { @Override public int nextBid(int opponentsBid) { return (int) (System.currentTimeMillis() % 21...

View Article


Answer by MegaTom for Dollar Bill Auction

One Extraimport net.ramenchef.dollarauction.DollarBidder;public class OneExtra extends DollarBidder { @Override public int nextBid(int opponentsBid) { if(opponentsBid < 110) return opponentsBid + 6;...

View Article

Answer by mleko for Dollar Bill Auction

MTargetedBotpublic class MTargetedBot extends MBot { @Override protected int calcBid(int opponentsBid, boolean isPeeking, boolean isSubPeeking) { Class c = this.rivalClass; switch (c.getSimpleName()) {...

View Article

Answer by mleko for Dollar Bill Auction

Non-competing: MSlowBotimport net.ramenchef.dollarauction.DollarBidder;import java.util.Arrays;public class MSlowBot extends DollarBidder { private DollarBidder rival; @Override public void...

View Article

Answer by Winston Ewert for Dollar Bill Auction

EvilBotimport java.util.Arrays;import net.ramenchef.dollarauction.DollarBidder;public class EvilBot extends DollarBidder { @Override public int nextBid(int opponentsBid) { if (isPeeking()) { throw new...

View Article


Answer by RamenChef for Dollar Bill Auction

StackTraceObfuscaterBotimport net.ramenchef.dollarauction.DollarBidder;import java.util.concurrent.FutureTask;import java.util.concurrent.RunnableFuture;import java.util.concurrent.TimeUnit;import...

View Article

Answer by Cain for Dollar Bill Auction

BluffBotimport net.ramenchef.dollarauction.DollarBidder;public class BluffBot extends DollarBidder {private DollarBidder enemy;@Overridepublic void newAuction(Class<? extends DollarBidder>...

View Article

Answer by Winston Ewert for Dollar Bill Auction

SecretBotimport java.util.Arrays;import net.ramenchef.dollarauction.DollarBidder;public class SecretBot extends DollarBidder { @Override public int nextBid(int opponentsBid) { if (isPeeking()) { return...

View Article


Answer by mleko for Dollar Bill Auction

MBotimport net.ramenchef.dollarauction.DollarBidder;import java.util.Arrays;public class MBot extends DollarBidder { protected DollarBidder rival = null; protected boolean rivalPrepared = false;...

View Article


Answer by Winter for Dollar Bill Auction

Edit: Targeted changes in the DollarBidder class has broken this bot.ScoreOverflowBotimport net.ramenchef.dollarauction.DollarBidder;public class ScoreOverflowBot extends DollarBidder { boolean betBig...

View Article

Answer by user48543 for Dollar Bill Auction

InflationBotimport net.ramenchef.dollarauction.DollarBidder;public class InflationBot extends DollarBidder { private int target = -5; @Override public void newAuction(Class<? extends...

View Article

Answer by ripkoops for Dollar Bill Auction

BuzzardBotimport java.util.Random;import net.ramenchef.dollarauction.DollarBidder;public class BuzzardBot extends DollarBidder { private int[] bids = new int[100]; private int oppFlag = 0; public void...

View Article

Answer by user48543 for Dollar Bill Auction

RiskRewardBotimport net.ramenchef.dollarauction.DollarBidder;public class RiskRewardBot extends DollarBidder { private int target; @Override public void newAuction(Class<? extends DollarBidder>...

View Article


Answer by RamenChef for Dollar Bill Auction

ImprovedAnalystBot (non-competing)A lot of people seem to be using the AnalystBot code as a template, even though it's deliberately bad code. So I'm making a better template.import...

View Article

Answer by Nissa for Dollar Bill Auction

Non-competing: AbstractAnalystCounterBotimport net.ramenchef.dollarauction.DollarBidder;import java.util.Set;import java.util.HashSet;public abstract class AbstractAnalystCounterBot extends...

View Article


Answer by Kevin Cruijssen for Dollar Bill Auction

CounterBotimport net.ramenchef.dollarauction.DollarBidder;public class CounterBot extends DollarBidder { private Class<? extends DollarBidder> enemy; @Override public void newAuction(Class<?...

View Article

Answer by Qaghan for Dollar Bill Auction

MarginalBotimport net.ramenchef.dollarauction.DollarBidder;public class MarginalBot extends DollarBidder { private DollarBidder rival; @Override public void newAuction(Class<? extends...

View Article


Answer by Neil for Dollar Bill Auction

RandBotimport net.ramenchef.dollarauction.DollarBidder;import java.util.concurrent.ThreadLocalRandom;public class RandBot extends DollarBidder { @Override public int nextBid(int opponentsBid) { return...

View Article

Answer by Insanity for Dollar Bill Auction

Darth Vaderimport java.lang.reflect.Field;import net.ramenchef.dollarauction.DollarBidder;public class DarthVader extends DollarBidder{@Overridepublic void newAuction(Class<? extends...

View Article

Answer by Nissa for Dollar Bill Auction

MimicBotimport net.ramenchef.dollarauction.DollarBidder;import java.util.Set;import java.util.HashSet;public class MimicBot extends AbstractAnalystCounterBot { private final Set<Class<? extends...

View Article

Answer by Silvio Mayolo for Dollar Bill Auction

InsiderTradingBotIn the spirit of @StephenLeppik's answer, InsiderTradingBot knows all of his opponents and understands their strategies. Your move, Stephen.import...

View Article


Answer by Nissa for Dollar Bill Auction

DeterredBotimport net.ramenchef.dollarauction.DollarBidder;public class DeterredBot extends DollarBidder { private int deterrence; public void newAuction(Class<? extends DollarBidder> opponent) {...

View Article


Answer by anna328p for Dollar Bill Auction

MirrorBotMakes the enemy play against itself.import net.ramenchef.dollarauction.DollarBidder;public class MirrorBot extends DollarBidder{ private DollarBidder enemy; @Override public void...

View Article

Answer by anna328p for Dollar Bill Auction

AnalystOptimizerimport net.ramenchef.dollarauction.DollarBidder;public class AnalystOptimizer extends DollarBidder{ private DollarBidder enemy; @Override public void newAuction(Class<? extends...

View Article

Answer by Silvio Mayolo for Dollar Bill Auction

LuckyDiceBotLuckyDiceBot only trusts his dice. He rolls two dice, adds the sum to the current bidder's value, and bids that much. If it's not enough to overcome the opponent's bid, he cuts his losses...

View Article


Answer by Kevin Cruijssen for Dollar Bill Auction

UpTo200import net.ramenchef.dollarauction.DollarBidder;public class UpTo200 extends DollarBidder{ @Override public int nextBid(int opponentsBid){ // If the current bid of the opponent is in the range...

View Article

Answer by histocrat for Dollar Bill Auction

DeterrentBotimport net.ramenchef.dollarauction.DollarBidder;public class DeterrentBot extends DollarBidder { @Override public int nextBid(int opponentsBid) { return opponentsBid > 5 ? 100 :...

View Article

Answer by user48543 for Dollar Bill Auction

TargetValueBotimport java.util.Random;import net.ramenchef.dollarauction.DollarBidder;public class TargetValueBot extends DollarBidder { private int target; @Override public void newAuction(Class<?...

View Article

Answer by AdmBorkBork for Dollar Bill Auction

BorkBorkBotimport net.ramenchef.dollarauction.DollarBidder;public class BorkBorkBot extends DollarBidder{ @Override public int nextBid(int opponentsBid){ return (opponentsBid >= 95) ? 0 :...

View Article



Answer by Kevin Cruijssen for Dollar Bill Auction

BreakEvenAsapimport net.ramenchef.dollarauction.DollarBidder;public class BreakEvenAsap extends DollarBidder{ @Override public int nextBid(int opponentsBid){ // If the opponent has bid 100 or more: bid...

View Article

Dollar Bill Auction

This 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...

View Article
Browsing latest articles
Browse All 31 View Live