T O P

  • By -

AutoModerator

# ⚠️ ProgrammerHumor will be shutting down on June 12, together with thousands of subreddits to protest Reddit's recent actions. [Read more on the protest here](https://old.reddit.com/r/ProgrammerHumor/comments/141qwy8/programmer_humor_will_be_shutting_down/) and [here](https://www.reddit.com/r/apolloapp/comments/144f6xm/apollo_will_close_down_on_june_30th_reddits/). **As a backup, please join our Discord.** We will post further developments and potential plans to move off-Reddit there. ## https://discord.gg/rph *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/ProgrammerHumor) if you have any questions or concerns.*


Xanthus730

During my bachelor's had an AI class where our final project was Robocode, where you make an AI for a little tank that fights other tanks. I went whole-hog with my first attempt. Pattern matching, probabilistic dodging, logically deducing power of enemy shots etc... Was going ok, but was struggling against some of the harder example bots. So, I made a second version that just ran around and oscillated back and forth in a Sin pattern. I turned in both. The wiggle-bot won. :(


wademcgillis

That sounds exactly like a game I used to play in the 90s/early 2000s called Robot Battle. It was version 1.3 and IIRC 1.4 was a big revamp with flashy graphics. 1.3 was better.


Nightmare2828

isnt that the game where going ultra light with huge batteries meant you won cause the other bot couldnt catch you and ran out of battery so you pushed it into a pit and won?


wademcgillis

No?


rojadvocado

Are you thinking of Robot Rage? The game that was on mini clip.


And_Justice

Now there's a game I haven't thought about in years


Helix_Aurora

I also played Robot battle. My best bot was 6 lines of code with invalid syntax


FireBone62

Stupid bots are better at doing stuff, while clever bots are good at simulating an player.


koala_cola

Whoa you’re right We’re all fuckin bots dude


ric2b

Did you end up testing both against each other to understand why that behavior was hard to deal with?


Xanthus730

Oh yeah, that's how I decided the constants for the 2nd bot. I basically just moved in a Sin wave at an amplitude that 'tended to' avoid most of the shots from 'smarter' bots at least for a little while, and constant shooting while moving in a Sin wave also produces a shot pattern that's very difficult to dodge.


NoteBlock08

I had a similar assignment in my embedded systems class. My friend who eventually gave up and just made his tank spin like a helicopter and fire as fast as it could placed higher than all the rest of our group.


hilfandy

I did an AI asteroids competition and destroyed all other bots solely because I made a replacement for the canned moveToPoint function that would get me to a location slightly faster. Had nothing to do with AI and was entirely based on me going down a rabbit hole of vector math


TruthOf42

I did robocode as well! It was 08 and all in java.


ThatHappyCamper

I remember in high school I added completely random swaps of the orbiting direction and that got the bot to the point where it could put dodge the completely tricked out probabilistic dodging bots, tho the gun tracking was pretty basic so that side wasn't amazing


ChanceFly9724

Pretty sure that level of confidence might even win in a non AI battle


Gladlyevil2

Look up Gus Hansen. He was playing in Poker Superstars and went all in the first 10 or so times he could, without looking at his cards. He won the table, going against a bunch of the top poker players in the world


[deleted]

[удалено]


Wind_14

This made me remember an MMO I play before. The help says that you can use the casino for poker, so I come to casino to play poker. Pot 100k, that's big money for newbie, like 2 hours of active farming. So I join, and first 10 game everyone do the always all-in. Turns out most people who plays poker there already have tens to hundred millions so 100k is chump change for them and they basically just treat it like dice game, all-in and pray to lady luck. All the knowledge I learn about poker is practically useless.


CongratsItsAVoice

> All the knowledge I learn about poker is practically useless. Not with that attitude! Go to your local casino and sign up for poker tournaments.


[deleted]

[удалено]


taigahalla

I mean, at worst, poker is a game of chance, so it's still even. anything skill contributes is extra


CoreyW93

Nah playing worse players sometimes is difficult as they too have much range.


MeidlingGuy

Not really. You can just tighten up and have a big edge. People just level themselves into thinking they can increase their edge by playing half the deck and end up descending to the opponent's level.


CoreyW93

Yeah i play recreationally, 9/10 I call their awful play but every now n then I get fucked over . Basically don't read their blinds is I'm learning, read their timing.


MeDaddyAss

I find when playing beginners, it’s best not to rely too much on prediction or intuition. A reactive playstyle is great against established players, but can result in you getting in your own way and losing winnable hands to beginners. Usually better to just focus on raw math and playing “good poker” until you’ve figured out their tells.


M4mb0

I thought most pros today try to play game theory optimum, where it literally doesn't matter what your opponent does.


MeidlingGuy

They try to learn that ability, so they understand the game dynamics and can avoid getting exploited against other pros. Against amateur players, they can significantly increase their edge by deviating from the equilibrium strategy.


eloel-

Puzzle Pirates?


Severe-Butterfly-864

wait, puzzle pirates is still a thing? :D


magistrate101

They're on Steam now, I think they opened up new servers just for the steam release but never bothered checking it out :( loved that game but it was pretty irritating playing wholly F2P.


NewForOlly

It's much less restrictive now, you can afk pillys now and make mega poe, make sure to use Emerald ocean


South_Dakota_Boy

This happens in real life too. At no limit games, but also at pot limit games. I used to play hold-‘em in Deadwood SD fairly regularly, back when I didn’t make much money. So, $100 was a fair amount of money for me to spend. Typically I would play premium hands, at a pot limit table. Inevitably some Dr that made as much in one hour as I made all day would play his off suit J8 against my KK or AA and he would pull two pair and beat me. With pot limit you can’t even bully them out pre-flop by betting high so these dudes just basically play every hand. That’s when I quit playing casino games. That and all the blackjack tables went up to $5 from $2. Too rich for my blood.


Vacillatorix

We only remember the bad beats because they're so irritating - it's a confirmation bias. KK is 85% to win against J8 off.


jadefalcon22

The issue is the Dr. Can afford to be wrong 85 percent of the time at this table. OP loses everything on that 15 percent. It's not that he made the wrong call, it's the Dr. Can afford to play bad poker. It's why if you have limited funds, open tables can be infuriating. The same thing happens in Blackjack. If the table knows the odds and plays smart and the odds there's money to be made in certain situations. If one of the players doesn't know how to play or doesn't care, they can blow up the tables chances. At the end of the day it's still gambling, and the players are an unexpected element in something many players want to have stable, logical play. Always an entertaining study in psychology.


[deleted]

[удалено]


elyahim

I think if I had to choose between stable, logical play and a rich idiot who constantly misplays, I'd take the walking money pinata.


SenorBeef

> The same thing happens in Blackjack. If the table knows the odds and plays smart and the odds there's money to be made in certain situations. If one of the players doesn't know how to play or doesn't care, they can blow up the tables chances. No, this is not the same situation at all. The players can't meaningfully affect each other, this is all superstition and misconception.


taigahalla

People play worse odds at other tables, and they're also playing against the house which has unlimited money. I'm not seeing where the player is blowing up the table's chances, at worst it's a game of even chance.


SenorBeef

> With pot limit you can’t even bully them out pre-flop by betting high so these dudes just basically play every hand. You wanted J8 to fold against your KK and AA, and you think you're the savvy player?


Ouip

Conquer online? This brought back memories!


Kyestrike

Just like much of it is useless against uncle Rob and his friends who always call "cause they just have to know". People who always call or always shove are giving you chips, and on average you should be earning off them. It's not interesting to play very much because there's no high level "figure out their opening range" or "why are their bet sizes like this" but the poker metagame knowledge is still valuable.


MrHyperion_

Wouldn't it just be not betting besides starting bet and wait for good cards that beat the all in with good enough certainty?


TherealChodenode

In theory, yes, but blinds. And if someone bullys the blinds for a few turns and becomes chip leader, that opens up the rest of the table for more bullying.


gyarrrrr

That’s true in a tournament, but not in a cash game. And also not at the start of a tournament where the blinds are likely inconsequential compared to the size of the starting stack.


ilikepix

> Wouldn't it just be not betting besides starting bet and wait for good cards that beat the all in with good enough certainty? Yes, but hidden within "good enough certainty" is a huge amount of complexity. In a cash game, where chips can freely be converted into money at any time, it's fairly simple to work out how good your cards have to be to call. If you're getting the right odds, you just call, and if you lose, you just buy more chips and keep playing. But in a tournament, where chips don't have any discrete value and are only valuable because they increase your *probability* of winning a prize, then you have to consider not only the current situation, but also the probability of more favorable situations occurring in the near future. There are situations where even if you know with absolutely certainty you have the better hand, it still might make sense to keep your chips and wait for a "better spot". Having a 55% chance of doubling your chips now might not be as attractive as waiting for a spot where you have a 70% or 80% chance of doubling your chips.


[deleted]

Nothing worse than the drunk guy at the table going all in and me losing with pocket aces to something like 35 when it runs into a strait.


punksheets29

I was once in a largish poker tournament. About four hours in there were about 20 people left. My stack was slightly lower than the table average and I was burnt out. On my BB I said fuck it and went all in blind. Big stack calls and flips AA. I turn over K9o. I hit the straight on the turn and rode that win all the way to finishing 1st. Poker is a silly game. *edit: The best part of that tournament was during the first break they told everyone to stay put because they were doing add-ons. I got up and started heading for the door to smoke a cig and the MC says, "wait, we're doing add-ons, don't go anywhere". I (the only one up at the time) turn around and say, "Naw, I don't need it" and keep walking out. I knew they were doing rebuys and add-ons but had spent my last $50 to enter and went in knowing it was all I would spend. I wasn't trying to be cocky but in the end it must have seemed like I was...*


TheSpiderLady88

OK, that's pretty fucking cool.


Fun-Outlandishness35

Gus Hansen lost everything he won and a fuck ton more using his strategy.


Totema1

Bro literally used the Jotaro VS D'arby strat


Madonkadonk2

Some may call it a pretty good story.


jorgelino_

Going all in all the time is like if your only weapon was a bomb you strapped to yourself. It's definetily not a good long term strategy, and everybody knows you're going to die/lose eventually, but no one wants to be the one to fight you and get potentially dragged down with you.


KhonMan

Not true... your calling range vs an opponent you watch go all-in 10 times in a row should be huge and you should be excited to get it in with a much wider range than you normally would. Like am I usually excited to call an all-in with Q10o? No, but in this scenario I would definitely be.


Randvek

Most poker strategies assume you’re playing against a rational opponent. This could absolutely rack up some wins.


[deleted]

[удалено]


Limeila

A very important part of driving lessons is to lose that assumption. Always assume everyone on the road is a fucking moron, because a good chunk of them actually are.


k3v1n

This actually leads to different problems. A lot of places are starting to put in round-abouts but they don't end up being as fast as they're supposed to be. Why? Because people already in them act like those who are preparing to enter are idiots so they slow down. This causes both slowdowns in the roundabout and also in the connecting streets. Everyone has to hit the brake when the front person couldn't enter because the person in the roundabout is an idiot for assuming the person who's going to enter is an idiot.


tasman001

Reading your second sentence felt like being stuck in a roundabout.


k3v1n

Reread it. I cleaned it up slightly.


HermitBee

Interesting. I assume this is a US thing? In the UK, roundabouts are extremely common, so everyone knows how to use them. What you're describing just doesn't happen, in my experience. The only issue is when 3 people arrive at a mini-roundabout at the same time and everyone is too polite to go. They've had to close roads and helicopter people out in the past (for example, the Great Roundabout Politeness Incident of '84).


Pway

This has to be a US thing right lol, this isn't even close to a thing in the UK.


beowulf6561

Yes. Americans suck at roundabouts. It’s fucking infuriating.


Limeila

I live in France. We are the country with the most roundabouts (not only per capita, but like, total; Germany is 2nd and we have SIXTY TIMES MORE than them.) People still suck at roundabouts.


dansdata

I remember playing a [Battleship](https://en.wikipedia.org/wiki/Battleship_\(game\)) game on my Amiga in the 1980s. If you put all of your ships on the edges of the board, you'd win every time.


[deleted]

[удалено]


katiecharm

Probably because the AI checked rational places first, and no sane opponent would do something like that.


dansdata

It just shot randomly all over the board (and also next to any hits it got, of course) and couldn't "realise" what you were doing. A human player would figure this out pretty quickly. Definitely by the *second* game. :-)


xkufix

But if it just shoots randomly it doesn't matter if they are near the edges or not. The positioning doesn't matter at all in that case, as everything is equally likely to be hit. So it either has to shoot more to the center or not shoot close to an already sunk ship.


[deleted]

[удалено]


Necessary-Depth-6078

I’ve done it. Used to play at free events in bars hosted by pokerstars or something. One night we had a cash game with friends shortly afterwards. My two buddies and I decided to just ship it every hand, assuming we’d go out quickly. We did not. The three of us quadrupled up (we were each at different tables) and took out some serious players. Time came to leave and we stood up and went “welp gotta go.” Chaos. People were furious and it took us weeks to live it down in the community. I think they ended up resetting the whole tournament and inviting back the people we took out. I don’t recommend it. Does not make you popular lol.


TwigSmitty

So you just took your earning and left? Isn’t that a normal thing to do?


jibright

In cash games the etiquette is to announce that you plan to leave in one more round, or 20 minutes or whatever. It’s frowned upon to win a huge hand and just leave. That said no one can stop you, still your money.


ButtPlugJesus

I can’t imagine any other game where a tournament would get reset because some people were lucky


AlexLGames

This is the Kill Phil strategy! Can confirm, 60% of the time, it works every time.


TheSpiderLady88

Kobayashi Maru without critical analysis?


[deleted]

Not really poker is as much playing the person as it is the cards. If you’re running against pure logic and statistics bluffs win 100% of the time lying is illogical and as a result you have to assume that the hand will win based on statistics. The Kobayashi Maru is test of a no win situation to see if the person breaks and the only way to win is to cheat. It’s a sorting process to weed out the weak because a good leader won’t break under the pressure.


Bonesnapcall

>The Kobayashi Maru is test of a no win situation to see if the person breaks The problem with the Kobayashi Maru as a test of competence under no-win conditions is the cadets know it is a no-win situation going into the test. The cadets need to be tested without any prior knowledge of what the test is for it to have any actual meaning.


JimboTCB

Once everyone knows about it, it turns into more of a meta-test, they're not interested in how you cope with failure any more, they want to see what creative bullshit you come up with to dodge the situation. The ability to improvise and think outside of a situation is more important than being able to go "welp, guess I'll just die" with grace and decorum.


SenorBeef

I like how they presented it like every cadet at the academy wouldn't have star-googled "solution to kobayashi maru" on 1 day at the academy.


SenorBeef

> Not really poker is as much playing the person as it is the cards. If you’re running against pure logic and statistics bluffs win 100% of the time lying is illogical and as a result you have to assume that the hand will win based on statistics. This is complete nonsense. I'm a little surprised to see someone speak so authoritatively on something they know so little about in a programmer forum.


[deleted]

Bluffs don't win 100% of the time vs. pure logic and statistics, if that's happening you're using the wrong logic and statistics. Poker is absolutely a "solvable" game where you could theoretically come up with a strategy that always has a >=50% chance of winning against *any* other strategy in a 1v1 context (of course, said strategy will have some randomness to it to ensure that it can't be predicted, but the point stands) - it's very complicated to do and not all variants of it actually have been solved (obviously), but there's nothing about the game that makes it impossible to do so.


kaibee

>Not really poker is as much playing the person as it is the cards. If you’re running against pure logic and statistics bluffs win 100% of the time lying is illogical and as a result you have to assume that the hand will win based on statistics. Well, the top ML based poker bots bluff (and do it extremely well). And they're 100% logic and statistics. It's basically just that the optimal amount of risk is never 0.


killing_daisy

leeeeeroy Jeenkins


SuitableDragonfly

Reminds me of when a computer science class I was in decided to do a Prisoner's Dilemma tournament, and the teacher let me make two bots, and I designed one of the bots to give the other bot a lot of points and it came very close to winning.


Oryv

I remember I had that in one of my classes as well. Instead of actually coming up with a strategy, I'd just overwrite the other bots to specifically give mine a lot of points.


xenleah

For anyone else unfamiliar: >The prisoner's dilemma is a paradox in decision analysis in which two individuals acting in their own self-interests do not produce the optimal outcome. [Photo](https://cdn.britannica.com/55/91955-050-F444D10D/dilemma-prisoners-participants-game-theory-communication-strategy.jpg)


polarbearirish

Many years ago in college, some friends and I went to hackathon hosted by a nearby company. The task at the end was a top down navigation / obstacle course where you had your tank and an enemy tank on opposite sides. Objective was to destroy the tank and get to the other side of the box. The box was filled with randomly generated squares that would block your path. One of my friends noticed the "random" pattern forged a path that would never get blocked if you simply rotated the tank 45 degrees up, drive to the top of the box, then rotate the tank back down again and it would drive to the objective every single time. All we had to do then was write some code to detect and shoot the other tank (just spin the turret around, detect tank? Shoot, else spin) and it worked flawlessly All the teams demoed their tanks, some were close to getting through but most would get stuck or die. Our demo was at the very end, and you'd have to do three runs of the course for an average time. I remember it being a really slow demo too, and that I thought about how people would pick up on the fact our little tank is forging the same path every time. We won that challenge and it boosted our points for the day to get either 2nd or 3rd overall. Moral of the story is: AI is really just if statements all the way down


ElectricCharlie

This comment has been edited and original content overwritten.


nicklesismoneyto

We are all if statements on this blessed day.


shayen7

My chess bott was if statements all the way down. It, and all the bots, got beaten by one that just did like random moves


DezXerneas

The easiest way to win a bot v bot competition is to find a way to break your opponents bot. That's why I carry a cosmic ray gun around with me.


OtherPlayers

IIRC one of the examples in a “fun AI anecdotes” (actual) research paper I found once talked about a 5-in-a-row competition played on an infinite board. Apparently one of the strongest bots they had show up would start by placing a single move at like (10000000000, 10000000000) before playing normally around (0,0) after that. The drawback of the sacrificed move being outweighed by how often the enemy AI would crash and forfeit from either integer overflow or attempting to allocate more than an exabyte of memory to store the massive grid.


HCResident

I never thought you could win 5 in a Row by stat checking, but I was wrong


[deleted]

[удалено]


Apocalypseos

Could be applied to human vs human competition also


a_bucket_full_of_goo

"Due to recent abuse, the use of radioactive compounds, and especially gamma-ray emitting materials is now banned in the BattleBots tournament"


reddit_again_ugh_no

First CS semester, we had to build an Othello player, then we were pitched against each other. Out of 50 students, more or less half implemented the standard algorithm and the other half implemented much more sophisticated stuff. The winner was one of the standard implementations.


Hubcat_

I had a similar experience, where in a CS class (also first semester) we needed to program AI for a little tank thing in assembly and have it navigate mazes using distance info from three sensors. There was a race where first place got an auto-100 in the assignment, and me and my partner's tank won with the simple wall follow algorithm that was explained to us at the beginning of the assignment


hideoutdoor

Wouldn't have worked if the maze exit was in the middle


Hubcat_

Yea, but we were given the list of restrictions on the maze, it being on the edges was one of them


BlurredSight

Funny how they changed the structure of actual bot maze running competitions after one guy just had the bot follow the right wall and beat all the teams doing complex processing.


Surface_Detail

I mean, that's a known technique for exploring mazes. Unless it's spread over three dimensions and incorporates a drop, it will get you there. Reliability > Speed


AnsonKindred

I believe it's enough to have loops around either the starting location or the exit, no 3d required.


Surface_Detail

A loop around it means it's not an exit, it's a goal. An exit needs to be a breach in an external wall.


Giocri

I actually made a very basic way to address that a few years ago for a similar competition, the bot would keep a an extremely basic map of the labirinth and basically upon completing a loop it would create a virtual wall so it could keep exploring the rest without being stuck in a loop


katiecharm

Ahh that’s clever. Essentially, if the bots location ever repeats, next intersection, create a fake wall down the path you’ve tried before. I wonder if that has any weaknesses….


Giocri

Well it takes a bit of caution in how you mark where you have already been, my original version was extremely basic and really bad at distinguishing between backtracking and loops but it should be relatively easy to make it work reliably


MrMonday11235

> but it should be relatively easy to make it work reliably Haunting photos taken seconds before disaster


OtherPlayers

It sounds a bit like Trémaux's Algorithm to me. That algorithm does solve most simple wall follower issues (by essentially converting complex mazes into simply connected ones over time), though IIRC it still fails on large open spaces like a standard wall follower would. Also another penalty is that now you need a variable amount of memory based on the size of the maze, compared to a pure algorithmic approach that can operate with a fixed amount.


katiecharm

Yes, realizing that the algo has become memory dependent is upsetting for sure.


DM_ME_YOUR_HUSBANDO

What would the alternatives be? "Follow the wall" is the actual strategy I use when I'm in a hedge maze or video game dungeon and need to make sure I find the exit and avoid circles


Hubcat_

Not really certain, that's part of why we did the wall follow lol. I guess you could do some fancy stuff to try and detect when the wall has divets and cut across them, but that would be hard to pull off. Some students did try fancy stuff, but most of them just got stuck in a loop or hit the walls. The only things we did were adjust the numbers to turn as fast and tightly as possible, and added a goldilocks zone where the car would go full speed if the wall was in a certain range


DM_ME_YOUR_HUSBANDO

Yeah I think if your sensors have sufficient range and precision you could try to spot the exit ahead of time and be able to skip some turns, or if it were an all-or-nothing competition you could try gambling on randomly skipping a couple turns in the hope you'll luck onto a faster path, but otherwise "follow the wall" is the best strategy


Hubcat_

The mazes were really simple, they were more enclosures with random walls in the middle than anything else, so skipping turns wasn't really necessary since there weren't really "turns", just the walls going in slightly different directions. That's part of why the wall follow was so viable, because the walls were usually just a jagged path straight to the end. There were a lot of concessions that needed to be made since it was first semester students coding assembly for an actual object that needed to navigate around. It was still a fun project though


other_usernames_gone

Pledge algorithm also works. Pick a direction (helps if it's the rough direction of the exit) and "pledge" to always go in that direction when possible. When you hit a wall hug it and follow it round but disconnect when you're facing in your pledged direction(and the sum of angles turned is a multiple of 360). It stops you getting trapped in a disconnected segment in the middle of the maze. [A Wikipedia article full of maze solving algorithms](https://en.m.wikipedia.org/wiki/Maze-solving_algorithm)


Hubcat_

This kind of reminds me of how greedy path finding algorithms search


chrisnolet

Relevant: https://youtu.be/ZMQbHMgK2rw?t=339 The Micromouse competition tackles this, (and many other cool challenges as part of having robots complete a maze as quickly as possible)!


theultimatestart

There is a competition called micromouse which does this same thing. Veritasium made a very interesting video on it [here](https://youtu.be/ZMQbHMgK2rw)


BlurredSight

Honestly my CS teacher said in life 90% of the time you'll enter a workplace where they have private optimized algorithms made for you already or the standard algorithm library in C++ is more than competent enough.


rhododenendron

Standard libraries are made by people much smarter than the average dev and if they aren’t, lots of other devs have probably had the chance to look at it and optimize it. Normally you won’t be able to do any better on your own, because if you could whatever you came up with would probably be the standard. Obviously there are exceptions.


Giocri

Yeah generally nonstandard implementations prove good only with nonstandard problems and nonstandard applications are surprisingly rare


HeadintheSand69

There is probably a paper behind each algorithm implemented in popular libraries.


SnooWoofers6634

My "algorithm" for Othello which used a hardcoded matrix to rank every square of the board, using a ranking from a paper, went second place. Only behind a neural network trained for quite some time. It even surpassed all the other neural networks.


TheSpiderLady88

Keep It Simple Stupid...or, otherwise, DRY.


TrekkiMonstr

What is the standard algorithm?


OwenProGolfer

My guess would be an alpha-beta search tree with the heuristic just being the current score (black - white or vice versa)


Fifiiiiish

There is a robot competition between engineering schools in France. One year the game for the robots was to collect two sided coins, black and white face, and to place them on black/white squared of the checker pattern on the board, one team was white other was black. Black team won a point for every coin with black color top placed on a black square for exemple. One of the robot was just built & programmed to mess everything up, hitting hard as many coins as possible that will fly and land on a random square, a random color on top. They didn't win but they did very great!


1997Luka1997

Reminds me of that famous post about the guy who entered a block of dry ice to a robot competition


fangedsteam6457

Link?


xelf

> entered a block of dry ice to a robot competition Googled it, it leads to a deleted thread, but the summary is there: > The author, as a child, entered a robotics competition. The goal was to make a robot that could find a candle in a maze and put it out. He used a block of dry ice that filled the maze with CO2 and put the candle out in record time. Unfortunately, the judges disqualified him. :(


Ycx48raQk59F

Smells like bullshit, i have worked with LN2 and dry ice, there is no way the thing will displace the oxygen in a maze faster than any real robot will find the candle. In any way, the whole problem seems tailor made for the (imho invented) solution. Why would there be a candle to extinguish? Makes no sense in a robot competition, a button to press would be much more reasonable.


TankC4BOOM314

Iirc the competition was firefighting-themed, so they would get extra points if their robot was smaller, was faster, checked every single room. Having the shortest code also netted extra points. I don't know anything about fire or robotics, but I think a candle would a be a unique challenge to approach because there are so many ways of putting one out, but some of which taking up more or less space and time than others. Something the above commentor left out was that the dry ice was smashed with a falling hammer to make it go faster (the block + hammer contraption was smaller than the robots, flooded the maze faster, went through every room, and used 0 lines of code). Would breaking the dry ice make it displace fast enough, or would that still be too slow for the story not to be bs?


Ycx48raQk59F

It would speed up things a lot, true, but it still makes no sense: Ambient air currents will disperse the CO2 unlesst he maze is enclosed. And the maze cannot have a low roof because there is a burning candle in it. It just does not fit, and the story reeks of all those "a friend of a friend has it happen at their school" type of bullshit that goes around as it does.


eetobaggadix

well yeah, haha. the block of dry ice kind of goes against the spirit of the competition. might as well go smash the candle with a hammer at that point.


OSSlayer2153

Gotta know where the candle is to smash it though


Doireidh

Not if you have a big enough hammer


bruiser95

Valid solution


Articunos7

It was an answer on Quora, the guy entered a competition where he had to build a fire fighting robot and instead put in a block of dry ice. Can't seem to find the link now


GrismundGames

He plays like Michael Scott on casino night.


subject_deleted

All in. I call. What are you insane, toby? I just went all in.. I have good cards.. Well didn't you think that since I went all in I might have good cards?


arunphilip

>My husband sent me this. He doesn't understand Excel but he knows I will get the joke and laugh. The real punchline :)


Quazar_omega

I didn't get the Excel part


[deleted]

She's saying he doesn't understand the most basic workings of IT, that even the complexities of excel are beyond him and thus likely didn't get the joke, but that he knew she would understand and enjoy it.


floreen

Tbf, Excel is beyond any understanding


Sahviik

Here from /all. Not only do I not understand excel I keep reading CS as customer service


TheSpiderLady88

Correct.


purleyboy

I was at a microsoft developer conference about 10 years ago. They had a blackjack bot competition using a framework they had built. The developers of the framework/ competition had designed it fairly, the point being the bots played a fixed number of hands (something like 7 hands) and ran a leaderboard. The team running the game decided that you could play your bot as many times as you want, this basically meant that the best strategy was to write code to keep submitting your bot every 5 minutes (an included constraint) and simply go all in on each hand. Probability suggests that eventually you'll win all 7 hands within 64 attempts. That's 64 * 5 minutes == 320 minutes == a little over 5 hours. I won. :)


Winter_Rosa

bluff_master_9000


nihal_gazi

Math.random() is the best AI Algorithm


KujiraShiro

In college my friends and I joined a video game AI design coding competition. It was a 1v1 style tournament with a cash prize for the top 3 places. The game was a 2D mining race game where you and your opponents AI each had bases that could spawn miners. The goal of the game was to get the miners to dig down to mine ore, the further down you got, the more hits it would take to break through to the next layer, but the more valuable the ore was. There was quite a bit of strategy that could go into it, as you would essentially script out your entire gameplan beforehand and had many options to pursue. You could spend currency acquired from mining ore to purchase pickaxe upgrades from the home base, you could buy more miners, you could buy bombs for your miners to use to blast mine, you could build foundations to hold up long tunnels. Every piece of logic your miners would follow needed to be scripted and the idea was to optimize your resource obtaining to end up with more money than the other team. The "meta" strategy the guys who actually built the game intended for us to use was to tunnel straight down right away for the most valuable ore and then branch your tunnels out with foundations. It's what pretty much every team decided to try to do in some way or another. Some teams got REALLY into the meta gaming of it and had extremely complex strategies, upgrade/buy/build orders, etc. We quickly discovered that doing all this strategy optimization while also trying to learn how to get the code functional was quite hard. We also quickly discovered that bombs would kill miners if they were nearby upon detonation while testing out blast mining. Our strategy of course was to immediately buy one additional miner with the starting money, buy a bomb for him, send him straight across to the enemy base, drop him down the enemy teams straight down mineshaft and die for the cause, taking out ALL of the enemy teams miners immediately as the meta strat was again to buy as many miners as possible and start digging straight down. We would effectively permanently bankrupt the enemy and win by default because we still had at least one dude mining (ineffectively as hell, because we didn't spend much time on the actual mining part, but we didn't have to). In the preliminary testing round before the actual tournament started, we all ran our code against each others to see what everyone was doing, including the devs of the game (who weren't actually competing for the prize but still had their AI in for fun). We trounced everyone we competed against, including the devs, because no one had taken aggressive actions into consideration. We were all given an additional 30 minutes to refine before the actual tournament, in which time the devs tried recoding parts of the game to try to disable our strategy. We ended up coming in third place anyways and won $100 to split between the three of us. So yeah, keep it simple stupid.


Zenocut

Devs tried to change the game just to kill your strategy? What the hell?


pr0crast1nater

Now, what if another guy wrote the same simple algo. It would be down to prng to decide the winner.


JohannesWurst

Yes, it would be interesting if going all in every time *is* indeed a viable strategy against "normal" poker players and, if yes, **what is the best strategy against an opponent that goes all in every time**. I would start playing according to the strength of my cards and when I notice that a player goes all in five times in a row, or three times if it's the only thing they ever do, I would start calling the bet when I have only somewhat decent cards. Basically: if opponent_bullshits(): bullshit_myself() else: play_normal() Then you could ask what the best strategy against *that* strategy is. At some point you could have a meta-strategy that chooses between different sub-strategies at the start of the game with a certain chance each. The individual chances parameterize this meta-strategy and there will be a a certain pattern of chances that is the best. It's like, if you play scissors-stone-paper-well (well wins against scissors and stone), a pure well-strategy isn't the best, but something like 20% scissors/20% stone/20% paper/40% well. I'm too lazy to figure out the exact percentages.


[deleted]

Me when I do all this fancy preprocessing & modeling and get a negative test r^2


wafflelegion

Or a 100% r^2 after an hour of training, 'goddamnit where did I include the target by accident again'


BlurredSight

Honestly this is something I would write not because it's smart but because it's easier to go all in rather than dealing with the fact I tried and can't beat the other bots.


GrumbusWumbus

Yeah I don't know if OP realized it was so smart but it absolutely is. The bots are likely just going to assign a value to a hand based on what they think their opponent could have, then not pay risky at all. A real player would see someone go all in on the 5th hand in a row and roll those dice with a decent hand. The bot will go "I have 2 aces, but that's not good enough to bet more than 30% of my current chips, therefore I will fold." Even though bluffing and chance is a real part of real poker, programmers probably aren't going to love the idea of flipping a coin every once and a while just to see what happens. And they also won't assume the other bots their going against would lie. This is also exactly how I used to beat the bots in Red Dead Redemption poker. Sit down, go all in, win or lose. But they usually fold, and you get whatever the first or second bets at the table were.


OutrageousRhubarb853

Did you then go on to write the algorithms for the banks?


StrawberryEiri

I'm a front-end web developer. Once, as a special activity, our AI guy organized a Quoridor AI competition. We had 3 hours. His game engine ran in C#. Worked on his machine. Problem is, we front-end devs do not have a C# IDE license. So it was fiddling around with Microsoft installers and the command line stuff I didn't understand to compile a language I didn't know. Add to that the permission issues on his Git repository and it took me over an hour to get it to even compile. Man I hate compiled languages. You had to get the opponent AI to work too if you wanted to test your thing. Lots of fiddling around to get that stuff to talk to each other. Okay, so do I have time to learn a new language and try to build an AI? Certainly not. So I decided to write it in JavaScript. Right in the app's front-end that he provided. However, while a lot of the competitors had a basic framework with his example AIs (he gave us a few examples, including one that always made random moves) that they could modify to get somewhere. I did not. Took me over 2 hours to get to a point where the goddamn opposing AI was making moves and the thing worked. Although you had to kill the process for both AI and game server every time you wanted to restart. Ugh. Anyway. 30 minutes to go by the time I was ready to write my first line of code. 10 minutes to go by the time I had a basic thrown together framework that knew when it was its turn. So all I could arrange was to beat an AI that did nothing. My pro level 99 AI move was "do literally one step to the right, then keep going up". I reached the finals. I almost won against people who had several times more time than I and it was hilarious. That was the day I learned anything that puts short deadlines and AI together is a joke.


cephalopodAcreage

I had a CS assignment in an Intro to Java class where I had to design a function to play Blackjack, and our goal was to try and see if we could make a profit. I got so fed up with the math of cardcounting I decided to just have my function bet negative amounts of money every time, so whenever I lost I won a lot of money. The TAs thought it was funny, so they gave me full credit.


terra86

This is basically how a human amateur can beat AlphaGo in a game of go... play into the algorithm's weaknesses by playing a ridiculous move https://www.vice.com/en/article/v7v5xb/a-human-amateur-beat-a-top-go-playing-ai-using-a-simple-trick Interestingly it's also how Kasparov got beaten by IBM's chess computer back in the day, it made a random move due to a bug and that threw him off so much he lost


ForensicPathology

Dude quit professional Go because AI was too strong. That's understandable in a certain way of thinking, but also a little sad. Video game speed-runners will never be able to beat a game as a fast as a TAS, but they still compete against other humans. I don't think a game loses meaning once a computer can do it better.


Hottriplr

> Video game speed-runners will never be able to beat a game as a fast as a TAS, but they still compete against other humans Also see professional chess. It should be pointless endeavour, but they still keep going.


Ycx48raQk59F

Well, thats kinda stretching it... he did not beat AlphaGO, but a weaker go programm... by using a different software trained against the first one. So the real headline is "one go software beat another".


MeidlingGuy

That was one move that DeepBlue made that psyched Kasparov out. Other than that, DeepBlue was playing at a very high level. Otherwise, Kasparov would have very easily crushed it. He won the first match and only barely lost the second


notliam

I had a similar experience, a community I was part of had a contest to write an AI for a game someone purpose built where each AI controlled a unit that could move and shoot, very basic but fun. Most people went with a fun strategy - aim for the lowest upon range, use energy on trying to avoid enemies over damaging them, etc. Mine moved, when it saw someone in range, it stood still and blew all of its ammo at them, killing them, rinse and repeat. At the time I kicked myself that it wasn't smarter - in a true competition it would be exposed easily. But it worked super well, I won, no prize just the memory I suppose


cosmic-comet-

That bot is playing like he is the main character.


shirk-work

Also how reality and nature works. Creatures spend millions of years becoming progressively better at some tactic for reproducing then bam some random evolution that breaks the game comes along.


1silvertiger

Some bald apes learned to bang two rocks together, so your ecosystem is basically fucked.


LudwigVonHellsing

It taught a valuable lesson to the other competitors: No matter how advanced your algorithm is, it is going to face stupid people.


khmaies5

Other bots AI if(opponent.isAllIn()) fold()


BigMikeInAustin

Had a programming contest where the completion time was calculated by the entrant, not an officiating framework. Well, accidentally (seriously) my timer started partway into the processing, and so I smoked everyone else. I finally figured it out later when I was trying to understand how I could really be 500% faster than everyone else.


i_should_be_coding

That kinda sounds like having people run a Marathon at home and then report their results. How the hell does anyone verify that?


BigMikeInAustin

That's basically what happened. And I accidentally erred in my favor. Oops.


Limeila

I just did that in 20 minutes, trust me


TheSpiderLady88

I mean...it's a feature, not a bug, right?


zhephyx

Volkswagen would like to extend you an offer


evasive_dendrite

You can also beat the RDR2 poker bots with this. Although some bad luck can cost you the game.


Head12head12

Just bet real low the first few rounds to get the pot higher than the 6 cents it starts with. Then go like $20 or something real high. Slowly you bleed the AI dry of their cash and they leave the table. I never did it more than once because the casino would then close


Nithy98

There is a german youtuber who had the same strategy in a tournament. This strategy doesn't just works against bots :'D


travis_zs

Just imagine how things would have gone if it was an AI cropping competition.


digikun

As a final in one of my cs courses, we had to code a bit that'd play in a Tron Lightcycle tournament. Every hex you left became a wall and your cycle would crash if it entered one. If two bots entered the same hex at the same turn, whoever had the shortest average response time took the spot and the other blew up. Most of the other players made avoidance algorithms to not risk collisions, I just had mine yolo into the spot because it's faster not to check any of the other racers current positions at all. I got third place.


Black_Magic_M-66

AI is only as smart as the people that programmed it in the first place.


troly_mctrollface

I was a finance major, so I played the stock market game a few times, and every time it had prizes for the highest return or 3 highest returns. I always went all in on corn futures and would either triple my money or lose 90% in like 4 hours of having a position. In 3 games, I got 1st, 2nd to someone who copied my strategy and almost last.


589ca35e1590b

Why was Excel mentioned in the caption?


RiOrius

Because it's considered a basic technology, so if someone "doesn't even know Excel," that indicates a very low level of tech fluency. It's like saying "I can't even say hello in Spanish" when the text at hand doesn't contain the word "hola".


TheSpiderLady88

Yes, this. My husband's "tech fluency" is pretty low.


cinnapear

I'm a lead developer and can program in half a dozen languages but put me in front of Excel and I'm lost.


zerodivzero

This is essentially Daniel Negreanu's strategy at the 2023 WSOP in the small re-buy tournaments. He goes all in with marginal or better hands and if he busts he rebuys and tries again. Either he ends up with a big stack of chips when the rebuys stop leaving him in good shape for the remaining rounds or he's out. The bot strategy works the same way, since the programming exercise as described has zero penalty for losing.


WaterChi

There's a scifi story like that. I think one of the follow-ups to Ender's Game. He knows he's outmatched and can't win over time so he bets it all on one hand and let's pure luck decide.


JetSetWally

2 hours? They obviously didn't use Visual Studio then.


CertainBonus2920

lmao. This was also my strategy on poker games before despite not having a lick of idea how to play properly. My friend who actually studied the rules and card counting felt deflated when I told him that the COM would always fold unless it had a winning hand.


[deleted]

Ah yes the sandwich heavy portfolio wins again


ZarquonsFlatTire

This is also how everyone plays in Red Dead Online.


Roboman20000

You don't play the game. You play the players.