this post was submitted on 12 May 2024
185 points (97.0% liked)

Programmer Humor

32581 readers
1152 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 11 comments
sorted by: hot top controversial new old
[–] tsonfeir@lemm.ee 18 points 6 months ago

My AI counts from 1 to ~~rand()~~ a number it chooses.

[–] Ironfacebuster@lemmy.world 8 points 6 months ago

Just like that AI powered rice cooker...

...that cooks rice exactly the same way every other rice cooker does

[–] Blass_Rose@pawb.social 6 points 6 months ago (1 children)

Honestly one of my most competent "AIs" (that wasn't ML) just did a whole bunch of math to calculate an optimal strategy, but to make it feel more human, I added a few other things, like how desperate it was to win this round so it could have a chance of continuing, a bit of arrogance if it was winning (it was a bit heavy in the beginning. Had to add checks for "if you've already won, submit your victory instead of becoming so arrogant you lose everything!"), and to top it all off: a random number generator that could make it pick the opposite of what it wanted to if the confidence strength wasn't high enough. Just made it a little less predictable.

Honestly made every competition against it really close. And certainly way better than the people who solved it with a simple "randomly choose an action to complete"... Which was most of the class.

[–] BlueMagma@sh.itjust.works 2 points 6 months ago (1 children)

What game was it playing ?

[–] Blass_Rose@pawb.social 5 points 6 months ago

Two-Dice Pig. So not a super complicated game, but still fun to try to leverage the... 3 point totals to calculate a risk vs desperation factor. Though looking at the code again, the hard limits feel weird. Like just straight up not allowing the risk of more than 35 points at a time (100 is a winning score, tho)? Though I do remember that I HAD to add the condition to force it to claim victory or it'd essentially get too cocky and would lose everything. I know that two-dice pig is essentially a solved game (as much as you can solve a game that relies on random chance), but I felt using a lookup table was boring, and wanted it to feel like it was actually an AI that could make mistakes, and had a semblance of a personality.

[–] NightAuthor@lemmy.world 5 points 6 months ago* (last edited 6 months ago)

Was demoing a thing internally, and the higher up asks if the NPC was AI driven.

It’s all pretty basic behaviour we programmed in, follow but not too close. When I point, go there and wait till I’m done doing my thing. A couple other things.

But my PM said “no, it’s just got some basic rules”… and I’m like bro, it’s arguably AI. Just say it’s AI.

[–] fossphi@lemm.ee 5 points 6 months ago (1 children)

So AIs are like big algorithms?

[–] samc 4 points 6 months ago (1 children)

Machine learning is just gradient descent through a subset of algorithm-space

[–] kureta@lemmy.ml 4 points 6 months ago (1 children)

that is only a subset of machine learning

[–] BlueMagma@sh.itjust.works 0 points 6 months ago

that is only a subset of turing machines

[–] laserm@lemmy.world 2 points 4 months ago

The algorithm counts to ten but also depends on a calculus and linear algebra library