ProgrammerHumor

winAgainstAI

winAgainstAI
https://i.redd.it/su65tx11tkef1.jpeg
Reddit

Discussion

Dystharia

I can relate. With a team of 3 others we won a robotic competition, just because we set the path the robot had to drive and then do nothing when he reached the playfield and most others had complex code do avoid objects and stuff and they all broke on the way to the playfield... It was very funny that the simple things are sometimes just the best.

15 hours ago
helicophell
:py:

Ahh, hardcoding. Works great if you only ever need 1 solution

15 hours ago
gianmk

I too like to make a calculator with elseif for every scenarios.

13 hours ago
shortfinal

That's why microsoft has patch Tuesday: they have to add more numbers to the calculator program to prevent reality from fracturing.

13 hours ago
jimbsmithjr

One time I tried to use my calculator but it could only give answers up to 256. Had to wait til they added more numbers to solve my problem

13 hours ago
unknown_pigeon
:py:

Why would your calculator ignore 0 as a number

12 hours ago
Natalie_2850

they did it a few years ago as a temporary fix after someone tried to multiply by zero

10 hours ago
TryingT0Wr1t3

In the early days when processing capacity was increasing constantly, it was worth it to just wait and buy a better computer later than starting to try to optimize your code for the computer you had when working with operations research trying to solve complex models.

12 hours ago
ViKT0RY

Interesting read: https://chadnauseam.com/coding/random/calculator-app

12 hours ago
StPaulDad

That was great. It shows that the simpler a problem is, the deeper you need to look to be sure you're doing it right. Dates are hard in the same way: obviously easy, but if you tread near the details it gets super obscure quickly.

8 hours ago
Chicken_Herder69LOL

AI? You mean adding a ton of else if functions and handing it to marketing?

12 hours ago
Nova_Aetas

I have the YandereDev example on my fridge and I look at it every day. Seriously considering framing it for my office.

God I wish there was an easier way to do this

12 hours ago
goilabat

That's a troll right ? Right ?

I know yandere dev is known for his if forest but did he really didn't know how to do that seriously, after that much time coding ?

Edit: ok fine that was a meme edit of his post ooof

12 hours ago
Nova_Aetas

The tweet is fake but the code is real. He was earnest about it, but never tweeted this.

12 hours ago
StrangelyBrown
:cs:

That tweet is sarcasm right? RIGHT?!

12 hours ago
goilabat

Yeah apparently a meme oof

12 hours ago
OwO______OwO
if inputA == 1 && inputB == 1{
   output = 2;}
elseif inputA == 1 && inputB == 2{
   output = 3;}
...
9 hours ago
Motoreducteur

That’s on the competition management though. If they wanted people to avoid hardcoding solutions, they could have made the path unknown in advance, or made a changing path with different obstacle placements for each bot

But the competitor bots would only ever be built for that one competition, so if you let the path be known in advance, it should mean you’re open to hardcoding solutions

Yes it’s less elegant, it has no reuse potential, but it works well with minimal effort. Nothing more that you could look for as an engineer

11 hours ago
OwO______OwO

but it works well with minimal effort

And it's simple, with minimal points of failure. Which is what allowed OP's bot to be successful.

9 hours ago
sitanhuang

Lol not coding related but similarly as a mechanical engineer we had a CAD class where we design miniature wooden race cars and the awards had categories like fastest, lightest, etc. I won the lightest award by literally gluing the wheels, motor and battery onto popsicle sticks, and using a smaller battery of half the nominal voltage needed to run the motor while barely overcoming the friction to maintain rotation. It was really ironic that the thing that required orders of magnitude less hours (1 hr vs 20+ hrs) in design & manufacturing won the competition than other over engineered ideas

15 hours ago
faceplanted

If you weren't travelling far and didn't mind paying for them you probably could've stacked up some button cells in series to get the voltage you need to actually win the race and still be the lightest.

The real trick is no batteries or motor at all, just an axle with a rubber band stretched around it.

(Although if you're going to that point of ignoring the spirit of the rules, the real real trick is a paper dart fired by an elastic band. It absolutely clears on distance, speed, and weight, we used to fire them to each other over the roof of the arts building at my sixth form)

14 hours ago
sitanhuang

The idea that the motor could run on half voltage was discovered during the actual competition day runs by observing the competitors, so last minute modifications were limited lol. Also, the vehicle had to fully meet a list of design specs and requirements, which prevented other more fantastic ideas like the paper dart

14 hours ago
faceplanted

Also, the vehicle had to fully meet a list of design specs and requirements

I figured they might, I loved these competitions for exactly this kind of lateral thinking within set criteria.

We had one in sixth form physics class where you had to make a lander that could fall gently enough to keep a fragile lightbulb circuit lit inside, everyone else built parachutes and wide bases to increase drag. We built a brick with a sacrificial crumple zone slightly to one side so it would smack into the ground, flip over sideways and land the right way up with the light still on.

We won in the classroom and then everyone agreed to try throwing their landers out the third floor window and ours flew directly into the trash can so hard that it buried itself and no one wanted to recover it.

14 hours ago
sitanhuang

Are we the same person? I did the same high school physics project with the same solution lol. It was just a crumble zone but with eggs dropped instead

14 hours ago
tessartyp

We had an egg throwing competition, the popular vote was a plastic jar of Nutella with the egg in it. Turns out the gooey consistency is perfect to absorb the fall!

...but the competition was stopped when one team showed up with a 1 m3 cube of welded metal bars and an internal suspension structure. Teachers were afraid it would break the floor and/or kill someone.

13 hours ago
invalidConsciousness
:r:

We had an egg throwing competition during the orientation week at my university. It had the additional limitation of only allowing a box of plastic straws and two rolls of adhesive tape as building materials.

The rules were "this will get dropped out of the window by an organizer, using two hands in the orientation specified by the constructors".
We had a nice design with a parachute above and some shock-absorbers below the egg. Our main competitors had built what basically looked like a stereotypical aerial bomb.

Both worked great, until the drop from the second highest window damaged the "nose" of the bomb-looking contraption irreparably. It wouldn't have survived the highest window after that. We were ecstatic, because our parachute had already reached terminal velocity from the second floor and we were confident that the top floor would be no problem, either.
That's when the guy responsible for dropping the contraptions decided to fuck the rules and just chuck our design out the window. Of course the parachute crumpled and the lines got tangled and the whole thing rammed into the ground upside-down. The bomb was declared winner, despite our protestations.

12 hours ago
huffalump1

Designing for the requirements vs designing for customers lol

Reminds me of a bridge building competition in engineering school, with spaghetti and gumdrops.

Instead of building beautiful trusses, we just mushed the gumdrops and spaghetti together into a thicc sticky shaft long enough to span the distance. Got 2nd place!

9 hours ago
invalidConsciousness
:r:

If we had been engineers, I might have found it more acceptable. We were physics students, though, and one of the first things they hammered into our skulls was how necessary it is to have consistent and reproducible conditions in our experiments.

The other group wasn't chucked out, either, but dropped carefully.

8 hours ago
MGTwyne

Hah, I did the same thing but with starched water instead of Nutella. 

7 hours ago
Secret-One2890

Glue button cells to the axles, so they double as the wheels!

12 hours ago
armb2

We had a "furthest distance propelled by a rubber band" competition at school. Winner, by a long way, was a three foot tall spaceframe wheel made of balsa wood using a twisted band and a counterweight. Second was me with some cardboard stuck together half an hour before the competition using the same principle. Third and onwards was everyone else using a linear stretched band instead of unwinding.
Then as a student engineer we had a similar competition but carrying a chunk of steel. After some careful questioning of the rules, my winning team had a ramp which crawled forward entirely over the starting line, pulled a latch at the top of the ramp, and let a wooden cylinder with the steel block embedded it roll down the ramp and along the floor to the other end of the room, about ten times further than anyone else got. It was within the rules, but clearly not what was expected. That we got a low score for "originality" because of that still annoys me thirty years later.

10 hours ago
PewPewLAS3RGUNs

This is the perfect example of "you get the results that you measure for"

"you want light? I'll give you light... Will it do the things this thing is SUPPOSED to do? No, absolutely not... But it is Light"

13 hours ago
WVVVWVWVVVVWVWVVVVVW

I also did engineering and the pitfall of all those competitions was when people tried to win in every category. I.e. the strongest, lightest, tallest bridge. If you focused on just one of those, you'd easily have won something rather than going for everything and losing.

13 hours ago
nonotan

Yes, but on the other hand, there should be a "best overall" type prize that somehow takes into account all the variables to optimize and rewards you for doing quite well in all of them, instead of amazingly well in 1 and utter shit in everything else. Otherwise, "playing to win" inevitably devolves into a bunch of barely-functional "this is technically within the rules" shenanigans, as you noted.

Which is fun and all, but if there's literally no room for the people genuinely trying to make the best thing possible rather than spending most of their effort rules lawyering, the competition might be poorly designed (IMO)

12 hours ago
BeardedBaldMan

Essentially what happened when our HR department designed an 'objectively fair' bonus system.

It worked for most of the company but was utterly destroyed by the part of IT that did development. We effectively achieved nothing for a year but somehow hit 100% on our appraisals and bonus metrics.

12 hours ago
OwO______OwO

but was utterly destroyed by the part of IT that did development. We effectively achieved nothing for a year but somehow hit 100% on our appraisals and bonus metrics.

They based your bonus on how many lines of code you produced, didn't they?

And the first lines of code you wrote were an automation script to automate Ctrl+C and Ctrl+V.

9 hours ago
ThePretzul
:asm::c::cp::cs::py:

That’s when you just start putting novellas into the comments of your code if you want the code to still be useful in some fashion.

That or if they based the bonuses on story point completion totals you just start overestimating everything.

9 hours ago
extremly_bored

There was (or still is) a national competition in engineering for students which we took part in years ago. They also provide a task and some specifications under which you have to solve the problem. E.g. we had to build a small vehicle which was supposed to travel like 2 m against the wind direction only powered by the wind.

One year there was a challenge to build a vehicle which was powered by 500 g of sand which could not be stored any higher than 30 cm above ground. The vehicle had to travel up a ramp (with a given angle) as far as possible. So it's quite straight forward to calculate how high up it can go given the weight of the sand and the car etc.

What the organizers did not account for was that they were not precise enough in specifying what "up the ramp" exactly meant. So one team brought an incredibly long device which had the sand and the "transmission" in the back and then had two carbonfiber rods extending like 2 m infront with a tiny wheel upfront. That meant they could shove the light front of the car way higher than 30 cm up the ramp, which was the theoretical maximum (if you did not cleverly dispose of the sand along the way) the other cars could go.

11 hours ago
GrumpyButtrcup

Similar story. We did an egg drop project in school. Everyone spent lots of time on their crumple zone popsicle stick shells.

I used cotton and pipe cleaners, making a giant airbag and I weighted it bottom heavy. It was so ugly it was beautiful.

Guess who was done in an hour and had a reusable egg drop shell. Only 60-70% of the popsicle stick frame shells kept the egg intact.

12 hours ago
JensenRaylight

Just like how a $500.000 state of the Art defense system with $20.000 per pop Ammo failed against some dirt cheap improvised weapon and defense that can jam and misdirect the fire

14 hours ago
Salt-Try-2687

Like that smart turret designed to detect people didn't trigger on someone sneaking by in a cardboard box.

13 hours ago
C_umputer
:py:

❗

12 hours ago
ameatbicyclefortwo

Punctuation that can be heard

11 hours ago
Itanican

Why can I hear this comment

9 hours ago
OwO______OwO

There were other AI-powered smart turrets that could fail if people just walked funny, did cartwheels, rolled on the ground, etc. It was trained to recognize walking and crawling people. If you chose some mode of locomotion other than those two, it wouldn't recognize you as a target.

9 hours ago
Salt-Try-2687

YES! That's the same one. They did a variety of goofy things that beat the programming.

4 hours ago
illyay

4 hours ago
Terrafire123

That was on the organizers for not randomizing the obstacles.

13 hours ago
WernerderChamp
:g::j:

We once had to do a pathfinding algorithm for a robot, so it would follow a line.

We took the "sample" code, adjusted some parameters, and set the motor speeds to max. Ez win.

15 hours ago
Fetz-

In my highschool time I also participated in robotics competitions. I played robo soccer in the "robo cup".

Our robots were much simpler than most others, but I tried to make it reliable at the expense of some features.

Ended up in 3rd place of a dozen in four different competitions due to simply doing the basics reliably.

Meanwhile many ambitious teams had overengineered bots that ended up freaking out or doing nothing.

12 hours ago
Congenita1_Optimist

Somewhat similarly, a team I was with won a Lego robot soccer competition with (turn clockwise a random number of seconds <5) + (go forward a random number of seconds <5) + (repeat). Just built the car so that it could keep going if it flipped over. We did it out of desperation because our sensors didn't work for whatever reason, but it ended up being much more robust than the other teams entries.

12 hours ago
notliam

I did a game jam thing where we made a bot and they went against other entrants bots (back in the days of flash), my bot had a bug where it would keep triggering fire when it had any bullets, whereas others were (smartly) trying to conserve their ammo and make each shot count. My bot won, because if it hit an enemy, that enemy likely got hit 10 times. I didn't see the bug when testing so that was a fun surprise.

10 hours ago
dragunityag

Reminds me of my middle school robotics competition.

We had to build a tool that would let the robot perform a variety of tasks that was basically just moving stuff from A to B.

Every other team had these huge complex rigs with some having cranes. We made a forklift. Our 1st team got 2nd and our second team that we made the day of got 4th out of like 20.

11 hours ago
fallinouttadabox

We won a robotics competition once because our robot was big and slow and bad but you lost 50 points if you went in the opponents zone during the final 30 seconds and we trapped a smaller robot in our zone until then, then let it out and pushed it back in for a -100 which easily let us win

11 hours ago
uday_it_is

Occam’s razor is a thing ya know

15 hours ago
DrBimboo

Not in programming. Well.. it is a thing, but the easiest/obvious solution is most often too simple and inefficient. 

14 hours ago
nmur

We also won a similar competition where we needed to make a robot that would transport a payload of rice across a platform, then across a raised gap to a second robot on another platform, which would then take it towards the finish zone. However, the scoring was essentially "mass of payload" x "distance payload was transported". Everyone else made complex robots that would attempt to crane up small 200g payloads, to varying success. We just built a huge dumb robot that carried 5kg of rice to the end of the first platform, winning by a huge margin

10 hours ago
onnie81

Oh, I remember our first robotics competition...

It was one of the simplest follow the line competitions... But at a glance we saw that in all other races the cirtcuit circled around until there was an opening.

We programmed our wimpy little robot to avoid the line, avoid contacts with other robots and seek the opening. At some point during the actual race its behavior puzzled the organizers so much they tried to remove it from the race because they thought we were somehow remotely controlling it in the way it just ignored all the traps and the scuffle with the other competitors.

We almost lost because I installed cheap batteries and it moved super slowly :o

11 hours ago
StendhalSyndrome

To be fair in poker this is a method of bully playing. If people don't know your style they assume for the first few hands you are on some run of hot cards. After a few more hands they know its bluffing and start calling and you can push harder when you actually have some sort of hand. One win like that crushes people's confidence and they end up folding them selves out to blinds or play a worse hand than they normally would due to the force and lose that way. I mean you can lose too but if you pull this play early you can knock out at least a person or two from the table before people figure things out. And by that point you should have a decent chip lead.

It's not the most fun play style especially in casual games, but only really has success there, against people who know or pros, you will get caught pretty quick.

10 hours ago
Everlier

I once won a robot racing competition with a "follow right wall", with a very slow crawler, while other advanced robots were hitting said walls right and left

10 hours ago
Throwaway_987654634

It's easy to bluff, but not as easy to successfully detect a bluff

15 hours ago
JaneksLittleBlackBox

Even less easy to teach a program how to detect a bluff.

14 hours ago
icehot54321

I spent my free time building poker bots from 2006-2009

Even back then, there were groups more advanced than I was that were collecting databases full of every single player out there and how they played. The information about your playing style was fed back into their algorithms. If multiple bots sat down at the same table, they can even share cards together to work in tandem.

Back then site owners tried to put captchas into the game to stop botting, but now I've seen captchas aren't a thing anymore, probably because it wasn't effective and only let people know other people were cheating.

Despite all this I still believe you can beat bots in no-limit holdem, but at limit tables, I wouldn't assume anyone to be real.

13 hours ago
Ok-Click-80085

Even before that there was the whole Ultimate Bet scandal

12 hours ago
icehot54321

I don't know that I would really call it "before" .. it was unfolding at the same time.

There were lots of rumors, and people had done analysis that essentially proved it, but the company didn't admit anything until 2008.

10 hours ago
11middle11

Captchas went away because if there’s money involved you can pay someone to solve captchas for you, and still make money.

9 hours ago
AdeonWriter

Never play no limits texas hold-em online for real money. Ever. The game services are not rigged, but the players are. It's sharing card info between bots that screws you. They'll dive for each other and sweeten the pot.

2 hours ago
OtherwiseAlbatross14

Since we're talking about robots, I assume there are no tells, outside of bets, checks, calls, etc. 

If your robot removes this last variable by just going all in every time, it's impossible to detect a bluff.

At that point, your robot would have to rely on the strength of its own 2 pocket cards alone to make decisions. 

The best starting hand(A,A) vs the worst possible hand(7,2 off suit) only has about an 80% chance of winning.

If all the other robots were programmed risk averse enough, they'd just fold every hand and be blinded out until their last hand. They could win a ridiculous number of times on the all in hands and would still end up losing because they'd always end up being blinded out eventually.

It wouldn't even be really conservative to program them to not call 100% of your chips when you only have an 80% chance of winning. Playing a tournament, the number one goal is to stay in the tournament so this would normally be a decent strategy.

All in every hand is the perfect strategy as long as all other robots are programmed to never call all in.

However, if even one other robot uses this method, your odds of being first out are now 50%.

These kinds of scenarios are very common in the various programming challenges they do and it's fun to see the evolution of different strategies over the years.

13 hours ago
temp2025user1

If they coded their bot to fold pocket aces against any bet whatsoever pre flop, they deserve to lose. You cannot know if your aces won’t break but whatever the odds, if you’re not guessing the other person’s hand in your algo, you should keep a wider range pre flop. I get these are college students or whatever, but unless they didn’t know poker at all, that’s a pretty bad strategy.

12 hours ago
Harepo
:py:

I think the really important part here is that they had 2 hours to make the bots. There's no better ingredient for design oversight than a time constraint.

10 hours ago
Jonathan_LaPaglia

It wouldn't even be really conservative to program them to not call 100% of your chips when you only have an 80% chance of winning.

You're right, it wouldn't be conservative, it would be downright idiotic. "only 80%" is insanely good odds. The scenarios in which folding AA pre-flop is correct are so few that programming a bot to fold AA 100% of the time pre-flop essentially means you're making the wrong decision 100% of the time.

I honestly doubt that the story is true. I think writing a really simple bot could work, and you could obviously always get lucky, but I find it impossible to believe that literally every other bot was developed with some sort of hyper-ICM-tunnel-vision that led them to folding literally every hand when facing an all-in.

11 hours ago
BoxAfter7577

I read an article where about someone using code to play poker against some of the world’s best players. They couldn’t compete until they added a RNG that added the chance that the bot would randomly, for no reason, go all in. 

After they did that the bot began earning more money than it lost.

13 hours ago
Throwaway_987654634

Predictability is a huge weakness of bots when put against humans.

RNG is a good way to remove some of this predictability.

12 hours ago
cyborgx7

If a persons bets are always directly proportional to the strength of their hands, you can, in theory, just derive the strength of their hand directly from their behavior, and then minimize your losses when your hand is weaker and maximize your wins when your hand is stronger. A poker strategy without RNG cannot win, because it gives up too much information, weakening your position against your enemies.

11 hours ago
BoxAfter7577

If a persons bets are always directly proportional to the strength of their hands, you can, in theory, just derive the strength of their hand directly from their behavior, and then minimize your losses when your hand is weaker and maximize your wins when your hand is stronger

That is exactly what top poker players do. It’s called like ‘Game Theory Optimal’ and this is what a lot of poker bots attempt to model. 

However, top poker players can then read other people and adjust their play accordingly. It was reading those plays and adjusting -in an unpredictable manner, that the poker bots struggled to do. So rather than stick in loads of logic to account for this, the programmers just made it completely random.

11 hours ago
joemckie

Hell, I used to play poker a bit with friends in my younger years, and we had this one friend that used this tactic all the time, with the same effect happening where everyone else folded.

It’s a valid strategy… until someone gets tired and calls, and it turns out he had a 2-7 lol

11 hours ago
LiveLoveRunEMP

True, but once you go all in every time, you're bound to win eventually!

13 hours ago
SuitableDragonfly
:cp:py:clj:g:

One time in a computer science class, we did a prisoner's dilemma tournament. After actually putting time and effort into a bot that I thought would do reasonably well at this, I had some time left over, so I quickly hacked together a second bot that essentially mimicked Vizzini's logic from the Princess Bride, mainly for shits and giggles. Unexpectedly, the professor accepted both of my bots into the tournament. The result was that my Vizzini bot handed massive amounts of points to my genuine bot, causing it to win the tournament. I had not tested them together (or really, tested the Vizzini bot at all, since it was not supposed to be an actual contender), so it was huge surprise. Vizzini, of course, came in at a very distant last place. 

14 hours ago
squigs

I don't see a problem with allowing two entries - if a student puts the time in, why not. I think it might be a mistake to let them compete against each other though.

In this case you were probably lucky but it feels like you could cheat this way.

14 hours ago
SuitableDragonfly
:cp:py:clj:g:

Yeah, that was the main reason why I had assumed that we would only be allowed to submit one bot. The professor did not regard it as cheating after the results came out, though.

14 hours ago
BreakerOfModpacks

You exploited a perfectly vaild loophole for a solution. That is, in my opinion, far better than just playing it straight.

12 hours ago
Kneef

One of the classic blunders!

10 hours ago
Vysair
:py: :cp: :j:

this is how invention and ingenuity is born

7 hours ago
bedrooms-ds

I mean, it's one way to win within the rules.

12 hours ago
PreacherSon90

When Robert Axelrod organized the first evolutionary prisoner's dilemma computer tournaments, to his great surprise the friendly tit for tat version was by far the most successful variant, and this algorithm remained the most successful over the following decades until some time ago so-called master slave algorithms won, which were only better than the friendly tit for tat algorithm because they were basicly the friendly tit for tat algorithm with a twist. When a master met a slave, the slave deliberately allowed itself to be exploited by the master. After all the decades since Robert Axelrod's first tournaments, this is still the only way to develop a better decision strategy for the prisoner's dilemma than a friendly tit for tat strategy. And that is why multiple submissions are forbidden in most tournaments.

13 hours ago
squigs

That makes sense, although I think you could probably avoid cheating by disallowing the entrants from the same team to fight each other.

13 hours ago
invalidConsciousness
:r:

If you have open entrance, you can just submit as two different teams.

12 hours ago
squigs

You can do that with the "no multiple entries" rule as well.

12 hours ago
Stop_Hitting_Me

Damn, even robots are getting kinky now

10 hours ago
SalsaRice

In board games, it's kind of called king making. You aren't trying to win, but decide who wins.

Some games are accidentally designed around it, as the way they are designed some players can get so far in the lead that the only option left for the other players is king making.

12 hours ago
Ilovekittens345

In Risk I usually win or decide who wins cause I can always sweet talk people in to doing my bidding disguises as helpful advice. It is however essential in risk never to be perceived as the strongest player

11 hours ago
MateInEight

I think it might be a mistake to let them compete against each other though.

"You'd like to think that, wouldn't you?"

- VizziniBot

11 hours ago
squigs

You clearly have a dizzying intellect!

11 hours ago
DHermit
:rust::py::math:

You need to make sure they are actually different entries. Otherwise people can submit 100 bots which have the same code and just differently tuned parameters.

13 hours ago
doodlinghearsay

Even if they don't compete against each other you can just build a bot that always cheats to hurt the scores of everyone else.

13 hours ago
adrach87

So how did your algorithm determine if it's opponent was Sicilian or not?

14 hours ago
SuitableDragonfly
:cp:py:clj:g:

It was a pretty simple algorithm - it just did the opposite of whatever it's opponent had done the previous turn. 

14 hours ago
bnl1
:c::hsk:

So, opposite tit for tat basically?

11 hours ago
Stop_Sign

The anti tit for tat. Every time they change answers, you also change answers, but only to ensure the opposite.

11 hours ago
Shimakaze81

Can you explain how the game/scoring works and why Vinnzinni gave your bot so many points? I love The Princess bride and would like to understand what’s going on here

13 hours ago
SuitableDragonfly
:cp:py:clj:g:

The prisoner's dilemma is a game where two opponents choose each round whether they want to cooperate or defect. If they both defect, they each get one point, if they both cooperate, they each get two, and if one cooperates and one defects the detector gets three and the cooperater gets zero. 

Vizzini was really simple and I didn't put much thought into it - it just chose the opposite action to whatever it's opponent had chosen in the last round. 

The other bot had a moderately complicated strategy that involved trying to predict what behavior caused the opponent to cooperate using evidence from multiple previous rounds, and then trying to do that as much as possible. Since Vizzini was really easy to predict, this strategy worked very well against it.

13 hours ago
StepDownTA

I do not think 'Vizzini's logic' means what you think it means.

Vizzini's first conclusion is correct, though inadvertently and not because of any reasoning he claims to employ: at the end of his monologue he finally says he cannot accept either cup, and indeed both are poisoned. However Vizzini acts upon the mistaken belief that the poison is only in one cup, his. He believes that his cleverly deceptive cup-switch will prove this, since DPR would only confidently drink from a cup that he knows will not kill him. This is also true, just for a reason inconceivable to Vizzini.

10 hours ago
Shimakaze81

Yeah I was kinda hoping the Vinnzinni bot would tell the other bot to look behind it.

10 hours ago
FellFellCooke

I'm glad you said this. It made me sad that the guy who liked the princess bride enough to code a robot in honour of one of its iconic scenes had zero understanding of that scene...

10 hours ago
TyrionReynolds

He’s fallen for one of the classic blunders

9 hours ago
MessesofMike

never start a land war in asia?

8 hours ago
SuitableDragonfly
:cp:py:clj:g:

Obviously the actual Princess Bride scenario is not representable within the rules of the prisoner's dilemma, because it's not the same game. Like I said, this was just a some goofy shit that I spent like five minutes on because I had no actual plans to enter this bot into the tournament, I didn't put a lot of effort into it. 

1 hour ago
Layton_Jr

So if you always defect, Vizzini will always cooperate? No wonder it lost the tournament

11 hours ago
jorizzz

Veritasium has a beautiful video about running these kinds of bots against each other.

https://youtu.be/mScpHTIi-kM?si=DB1u9__ouQR2JERm

Highly recommended watch!

13 hours ago
lucidspoon
:cs:

We had to write an AI to play the game where players take turns picking up sticks until they're gone. We were supposed to train the AI by playing against it. I just created another bot and let them play against each other for like 1000 games. Left the computer lab (this was 20+ years ago), and saw everyone else stay to spend hours playing against their bots.

Mine was unbeatable.

12 hours ago
_PM_ME_PANGOLINS_
:j::py::c::cp::js::bash:

That game is called Nim, and it is fully solved.

11 hours ago
solonit

A bot using Vizzini's logic? Inconceivable!

11 hours ago
thisusedyet

I’m interested in Vizzini bot - how do you program stall, stall, stall, CHEAT?

11 hours ago
[deleted]

[deleted]

15 hours ago
big_guyforyou
:py:

however the bot isn't programmed to respect other people's boundaries so once it loses all its chips it starts stealing from other people

15 hours ago
DiddlyDumb

It learns how to produce chips and will consume the planet looking for resources

14 hours ago
LrdOfTheBlings

Universal Paperclips, but with poker chips

14 hours ago
DJcrafter5606

Actually, not bad strategy, just screwed if some other bot gives 2 fucks about all ins.

15 hours ago
Maigrette

Still weird that people wouln't follow a all-in with a pocket double Ace.

14 hours ago
BountyBob

They might have done, but then not been dealt AA often enough. One in every 221 hands, you get AA, assuming Texas holdem.

13 hours ago
chief_chaman

Those arent great odds for the all in bot at a six person table tho. Even assuming the other bots are only calling with aces (pocket Kings, Queens and Ace King are also likely calls) the chance another player has aces each round is ~2.3% (napkin maths just putting 1-(220/221)5). Roughly every 50 hands the bot should be called, 50 small and big blinds is not nearly enough to net a profit long term.

The more likely reason for the bots success is that somehow none of the coders have ever played poker and thought all in was something you only do when you have the nuts, that and the 2 hour time limit makes it difficult to fully program a bot that can calculate the EV of shoves.

12 hours ago
BountyBob

Those arent great odds for the all in bot at a six person table tho.

Where was 6 max mentioned? Obviously if 8 or 9 max, then it becomes even less viable. Bot competitions like these, are usually heads up. Although assuming that is as dangerous as assuming 6 max.

Funny that we're discussing a game that is one of incomplete information, about a situation of which we have imcomplete information.

11 hours ago
Smart_in_his_face

Everyone probably spent their time to calculate the value of each hand and set limits to betting. If the value of the hand before the flop is lower than the pool, then fold etc.

Everyone was playing computer games, but OP was playing poker.

12 hours ago
ResolveResident118

I remember winning a contest by writing some terrible code to guide a robot through a maze. Basically, always taking the left turn but with a lot of duplicated code. It's probably the worst thing I've ever written but it worked.

15 hours ago
LeonidasTheWarlock

IIRC sticking only to left or right turns is a guaranteed method to get through 2d mazes.

13 hours ago
ResolveResident118

Yeah, the strategy was sound. The code to implement it was horrendous though.

What made it "cool" though was that could only compile it locally. To run and test it against a maze we had to do it in front of the whole group. Some of the more complex implementations where they'd tried to keep track of where the robot had been were pretty amusing.

13 hours ago
RevengeOfTheLeeks

Always turning left or right is essentially a depth-first search where each junction is treated as a node. It's a very efficient algorithm for solving a maze. I like your solution!

11 hours ago
mikeyfireman

Fun fact, that’s how we were taught to search in the fire academy. Always keep the wall on your right.

9 hours ago
HeroOfOldIron

It’s a guaranteed way to solve a maze if all the walls are connected. If there’s a floating set of walls that aren’t connected to the rest, always turning left will fail to explore that part of the maze.

12 hours ago
Unbundle3606

If you start from an entrance in the outer perimeter you are guaranteed to always find an exit in the outer perimeter, i.e. solve the maze, even in your scenario (I'd say when people say "solve the maze" they don't mean "explore every part of the maze").

If you are dropped in the middle of the maze you might not find an exit by always turning the same way in your scenario, because you might get stuck in a loop around an "island" of walls unconnected to the perimeter.

11 hours ago
Layton_Jr

A maze with exactly 2 exits (one of which you enter from) has 2 outer walls and the rest are floating inwards walls. If you keep following one of the outer walls you'll eventually find the other exit.

That method doesn't work if you start inside the maze or if the target is inside the maze

11 hours ago
AwkwardWaltz3996

I did similar for a university assignment. Grade was based on time to complete. There was a shortcut that saved a lot of time but your robot had to be able to detect it and turn right to cut through. Mine glitches at that point, overshot a left turn and turned 270 degrees left and got the shortcut. Jammiest thing I've ever done

11 hours ago
FuzzyLogic0

We had a similar competition, the format was multiple tournaments and you get points for the position. My first bot was similar to yours, except the opposite. Fold every time. The majority of bots on our tourneys were too aggressive (like yours) so, while I'd never be able to win a tournament, I came 2nd almost every time. Won the initial rounds on points by a huge margin. This was a longer form competition so I did have to make improvements over time. 

14 hours ago
JustBen81

Mark Twain wrote:

The best swordsman in the world doesn’t need to fear the second best swordsman in the world; no, the person for him to be afraid of is some ignorant antagonist who has never had a sword in his hand before; he doesn’t do the thing he ought to do, and so the expert isn’t prepared for him; he does the thing he ought not to do: and often it catches the expert out and ends him on the spot.

13 hours ago
Cat5kable

“Button Mashing is unpredictable, and UNGA BUNGA can sweep pros sometimes”

9 hours ago
Impressive_Plant3446

This is why you always have a "noob stomp" strategy against people flailing.

Chiv 2 is a good example. People get so used to fighting other people who know how to play the game, you go in expecting them to hesitate leaving their defensives open, so you predict a parry... but these noobs come in flailing wildly and it throws so many off their game because they are used to the song and dance of the sword play.

That is why people who expect unpredictable noobs have Feint spamming and crouch spamming in their back pocket. It throws new players off so wildly they they die pretty quickly.

Be ready for the song and dance, but keep and eye out incase the guy with two left feet starts trying to step on your toes.

8 hours ago
Drynwyn

All of them were making robots, but only he was playing poker.

15 hours ago
YouNeverReadMe

Brought to you by Tumblr

15 hours ago
Reelix
:cs:

Which was stolen from Reddit - We've gone full circle :)

14 hours ago
YouNeverReadMe

Yeah linked that in another comment. Wouldn’t really call it stolen though since it’s an obvious screenshot. All we need is an iFunny or 9gag logo in the corner

14 hours ago
amish24

i had no idea this was so recent.

11 hours ago
PinkSwayy

Bot said ‘fold.’ OP said ‘bold.’

15 hours ago
Octupus_Tea
:cp:

r/croppingishard

15 hours ago
MiniDemonic

Here I made it better for you

14 hours ago
Octupus_Tea
:cp:

lmfao thx that was really helpful

14 hours ago
YouNeverReadMe

Here, can read the whole thing

15 hours ago
Animal31

Play the bot, not the hand

14 hours ago
RTheCon

I got second place in a AI competition that revolved around a little base that spawned guys who had to path find to the other enemy base doing the same thing.

Our team barely even managed to set up and follow the installation process before we ran out of time. So we just added in some extra randomisation, and just beat the other models (who probably did the same thing) with luck.

14 hours ago
kerema1474
:cs::j::gd: :py:

where can I find these competitions to participat in?

13 hours ago
BreakerOfModpacks

Search for hackathons near you.

12 hours ago
RTheCon

This one was locally hosted at the university I studied at. So in person.

13 hours ago
GeneticEnginLifeForm

Taught a friend Texas Hold'em and this was his strategy. Every hand he was "all in." Really took the fun out of the game. I never played him again.

14 hours ago
EisVisage

So you could say he didn't hold'em.

12 hours ago
nazitrancefuckoff

Was lucky enough to win a (real) tournament like that once, was maybe 300-400 euro so nothing big but anyway.

Long story short, something personal came up and I had to leave the venue so I started pushing all in thinking I'd be out in a hand or two. Ended up winning from p7 in something like 15 hands iirc.

The card was just hitting me over and over again (although hands were mostly just marginally better, some I won even on a higher card as opponents were calling me left and right when they realised what I'm doing).

Just like you said, you can imagine how happy everyone in the room was but it was ok, in the end everyone had a good laugh as we all pretty much knew each other and it was relatively small stakes.

11 hours ago
AwareOfAlpacas

"That's poker." Literally the only thing to say about it. 

This extremely uncomplicated strategy shows up all the time in tournament play. Sometimes it's forced by someone's position or stack (gotta do something before they bleed out). Sometimes a player doesn't know any better way to play. And sometimes players just wanna feel like they can bully everyone. 

Tends to work for a while. Cards will still beat no cards in the end, however wild the betting. 

10 hours ago
MankeyFightingMonkey

Ned's Declassified Spelling Bee...Ned made it to the final 3...by sheer luck.

9 hours ago
PairOfRussels

The world's best coder doesn't fear the 2nd world's best coder.   He fears the worst coder, because he can't predict what that idiot is going to do.

11 hours ago
runswithclippers
:cp::py::js::cs:

Even worse, he fears the End User, because those fucks will find every which way to break shit.

5 hours ago
sterfpaul

I won a similar competition for SC2 bots. Select all workers and attack opponent starting position. All other bots were busy starting their first buildings.

13 hours ago
NotTheOnlyGamer

Zerg rush indeed.

8 hours ago
SirJebus

this screenshot has been reposted and cropped so much that some of the words don't even fit in the image and the watermark has been cut off, why would anyone ever save this image and then think "yeah i'll post it again"

12 hours ago
UnusualDifference748

It’s the screenshot version of the Charles II of the habsburgs. It’s a deformed product of so much incest it can’t even speak and make any sense

11 hours ago
skeletordescent

Once in high school way back in the 90s we had a robot competition. I knew everyone would use a remote controlled car. So I asked my radio engineer father to help me build a radio jammer and we tethered our car with a coax cable. It was wildly overpowered and made the CC TVs go fuzzy. I was disqualified but happy. 

11 hours ago
Byrune_

We had a similar experience at a hackathon where we were coding AI to play a complex boardgame, and playing them against each other. It had pretty obscure rules, and you automatically lost if your AI made an illegal move. While everyone was busy with elaborate strategies, we just focused on playing the game correctly, and just had the bot make random but legal moves. If the game went on long enough, the opponents' bot would make a mistake, break a rule, and we would win by default. Placed pretty high with this strategy hehe.

13 hours ago
KIAIratus

Pretty much how you can win tennis up to a surprising level. Just get the ball in.

9 hours ago
LevelSevenLaserLotus
:cs:

I played a bunch of tennis through high school, and I'm getting into pickleball now at my local gym. It's amazing how consistently that strategy works. Just focus on staying in bounds with basic shots, and keep the opponent playing long enough for them to make a mistake when they try something fancy. Is it quick? No, but focusing entirely on defense means they'll eventually get frustrated and overshoot somewhere.

9 hours ago
FoolishChemist

My physics prof told us of a university meeting where they had a team building exercise to make the best paper airplane. The physicists said "Let's approximate the plane as a point particle" They crumpled the paper into a ball and it "flew" the farthest.

11 hours ago
Far_Round8617

I know a guy called Thor that is been 8 years developing a Calculator app using a switch case for every possible combination of numbers for the operations +, *, /, and -. 

He is still in + tho. 

13 hours ago
Shieldine

Hardcoding some garbage is sometimes a good way if you know you'll never see this code again.

Back when Google Hashcode was still a thing, we used to have a university leaderboard, with a little prize for whichever teams made it to the top 50% (or could be 30%, Im not sure) teams.

Those thingies usually required some fancy algorithms to solve efficiently, but we were in our 1st semester and had no idea wtf we were doing. It was about optimizing traffic and outputting for how long lights on intersections should turn from red to green to allow as many cars as possible to pass to their destination, if memory serves me right. The input included the streets and intersections (and the number of cars I think?).

We ended up just reading the input, filtering all unused streets and just hardcoding 2 seconds for each light.

Thing is, the other teams from our university (and I assume from others as well, judging by our place) went all in for solving this with actual algorithms, and they ran out of time, while our (completely garbage and inefficient) code was written quickly and had enough time to run a couple inputs, providing us with enough points to a) pass the threshold and b) win the leaderboard.

Winning a prize for this abomination of a script was something else.

13 hours ago
OShaughnessy

Old poker pro David Sklansky made up a similar all-in strategy for a friend's daughter who was new to poker tournaments.

If someone raises before you, only shove AA, KK, or AK suited; otherwise fold.

If nobody has raised, go all-in with any pair, any suited ace, AK, or suited connectors (except 32s and 43s).

Early in the tourney with tiny blinds, only shove AA.

He claims it's surprisingly tough to exploit thanks to the pressure others feel not to go broke (aka. fold equity).

8 hours ago
Fit-Amphibian2802

hahahah this was so funny 15y ago when it was posted...

screw the dead internet, repost shit that was already old 10-15y ago and filling the gaps with AI slop..

14 hours ago
vernacular_wrangler

I was in an engineering challenge to find a creative solution to a robotics problem. Had to come up with something that fits in a small cube, and can autonomously navigate an obstacle course and deposit some ping pong balls into cups along the way. The winners used a trained toddler

12 hours ago
hod6

All fine until you come up against the opponent with AA preflop. Then it’s showdown time and you are not favourite.

14 hours ago
dalenacio

Yeah but by then the all-in bot will likely be the tall stack, and thus will be able to eat the loss and keep going.

14 hours ago
BenevolentCrows

Something similar, I won a hackatlon where you needed to transfer a lot of data with a crappy speaker and a mic. Other teams were making fancy error corrections, we didn't give a shit, nor we knew how, we just transfered so much more data, that even with 70% loss rate, we transfered more correct bytes that other teams in the given timeframe.

13 hours ago
PurushNahiMahaPurush

Ahh yes the poker equivalent of button mashing.

10 hours ago
QultrosSanhattan

Basic rule of engineering: Always try the shortest path first.

9 hours ago
Potato_Golf

I won a "stock investing" competition in school because I put it all on... Blockbuster, which went up a miniscule amount over the week.

Thank God no one gave me real money to invest haha

8 hours ago
Turkino

This reminds me of a game theory video I watched about various strategies on the "Lie" vs "Don't Lie" game.
I think the best win record bots were the ones that cooperated but as soon as someone lied against them they would start randomly retaliating.

8 hours ago
DoctorWaluigiTime

Clickbait title (using 'ai') and a common repost. Double whammy for the spambot!

Link to original source.

Remember folks: Downvote and report and block the bot account while you're at it!

13 hours ago
MrFlablesworth

In a CompSci class we had a "catapult project" we we needed to launch as many ping pong balls into a small basket (2ft away) as possible within a minute. The only criteria was that it had to have a coded moving part that touched the ball. My partner and I built a tall ramp with a rotating arm at the top and more than doubled the 2nd place score

12 hours ago
apolitical_leftist

Ok realistically what do you do against a psycho playing like this in a real poker game

12 hours ago
PretentiousAnglican

If they always do this, then most of the time they have a bad hand

When you have a good hand, call

12 hours ago
ElPuercoGordo

That's how Kirk beat the kobayashi maru test

11 hours ago
NeonPatrick

There was a Smart Guy episode where TJ can't beat a computer at chess, then Marcus inspires him to make nonsensical chess moves, which then confuse the computer so much it can't compute.

11 hours ago
ItsRobbSmark

You fucking edge cases, man....

11 hours ago
neutral-chaotic

What "AI" at most companies joining the hype train actually looks like.

11 hours ago
Drunk-Pirate-Gaming

I remember last I saw this post I remember the top comment.
"The others were building a code. Only the OP was playing poker."

11 hours ago
MrCarri

This also happened to me, I had to develop a AI for a subject in Uni that had to play the game of farmers (I don't know how the game is called). Basically each player starts on each corner, and you have to conquer other players or neutral positions, and after a while, the one who has more positions wins.

I didn't have the time to make anything serious, but the price was an extra point on the global score out of ten, so I gave It a shot brute forcing my farmer into going just forward, and It ended up winning.

They refused to give me the extra point because it was super simple, I had to complain a lot and in the end they didn't want to :(

8 hours ago
procmil

AI = All In. You were destined to win with that algo

8 hours ago
Ok-Island9905

if (confused && lucky) { win(); }

8 hours ago
Daniel_H212

Once heard of someone winning a school paper airplane competition by crumpling their sheet into a ball and just throwing it.

3 hours ago
Nicolauze

Me and my friend once won a university AI hackathon where we pitted agents against each other in a simulated world with "food" and "combat".

Our agent won by ignoring all objectives and opponents, prioritising just replication to the point of overrunning the entire world - thus monopolising all objectives and snuffing out opposing agents as a result.

13 hours ago
B_Hopsky

Yeah this was my strat for cheesing Poker Night at the Inventory way back when for TF2 items. The AI folds if you go all in round 1 so you just bleed the AI players out with the blinds.

12 hours ago
echoAnother

I remember at the uni, a competition of AI agents, for a war game. We just programmed to avoid friendly fire, just that. We won. All others tried super complex strategies. They all killed between themselves.

8 hours ago
Alan_Reddit_M
:g:

Bluffing be like:

14 hours ago
Front-Difficult
:ts::js::py::m::bash:

Still must have gotten lucky. You'd expect one other 1st year to have programmed their bot to do

if isMyTurn and cards.contains('AA'):
    goAllIn()

So they must lucked out with their 72o at least once.

14 hours ago
Cyber_chipmunk

Thing is you should have more chips by the time that happens and be able to tank something like that

13 hours ago
joehonestjoe

Yeah and even if you lose they'll only get their all in back, so you'd still be in

In heads up though you could still lose to a far inferior hand statistically, and there is no bluffing to try and save the hand at that point. Hand is only as good as the flop 

The bot could conceivably play all in 7 and 2 and the flop could be 2 7s and a 2 and sure the aces player is one card off a full house, but if they hit the 7s full house the 7 and 2 player just got a four of a kind.

13 hours ago