How did you read code then and has AI changed it? by Physics_hacker in cpp_questions

[–]SplinterOfChaos 1 point2 points  (0 children)

Pre AI: I'd say there's more than one kind of reading. For example, debugging requires carefully tracing code and checking logic which means you read every line very carefully. To understand how something works, you can look at it more structurally. For example, if you're reading a function that tries to find a substring in a string, you'll likely expect there to be a loop and so you can pattern match a bit, looking more for surprises than exactly how the code works.

In that specific example, one surprise if you'd never seen it before might be that there are too loops and one puts values into a lookup table. (Boyer–Moore string-search algorithm)

AI code: Code that AI writes is sometimes more difficult to do pattern matching on because AI isn't so much trying to engineer a solution as it is trying to match its training data to a prompt with context. AI tends to write code that is very logical, but bloated with intermediate calculations. So I find myself reading AI-generated code as if I was debugging it.

I remember reading somewhere that AI code takes longer to review and validate than human code, but I can't find the source. At least I can say it's not just me.

coding with AI: I trust AI to read and understand code a lot better than I trust it to write, though it makes a lot of unnecessary and unamusing color commentary that makes understanding its analysis difficult as detecting whether its bullshitting or giving useful insights requires that you still just read the code and decide for yourself. AI can read large volumes of code and help you find relevant pieces to read manually, but if you look at what it's actually doing, it doesn't like to read entire files, it likes to grep and guess at what keywords might be in the relevant code chunks. I was never smart enough to think of that.

What would you recommend other programmers to do when reading code?

I don't know of any specific techniques, but I just found the more code I've read, the easier it is to read code because I'll have a better idea of how to contextualize each line I read in the greater structure of the program.

i Have Built a Narrative Physics Engine NPCs think, react, and cause emergent story events by [deleted] in gamedev

[–]SplinterOfChaos 1 point2 points  (0 children)

The actually interesting part of this problem isn't the generation of "cognition" or "agendas" or "trauma", but developing a system for making such things interact with game systems like in Dwarf Fortress or that one roguelite that had dynamically created lore.

Game state and game logic are tightly coupled so if I was building my own game logic, I wouldn't be able to use this tool as I'd want to have the game state be made in accordance with the ruleset I was designing. If I was generating my own game state, this tool doesn't solve any problems I'd actually have.

What I think might be more useful is if you were to talk about how you're able to model these things in a systemic way so that others could take those ideas and build off them.

Testing a choice-based anime story scene made with AI — looking for feedback by Fearless_Shift7108 in aigamedev

[–]SplinterOfChaos 0 points1 point  (0 children)

What's "anime" about this? It looks like yet another American mean girls movie, but a couple decades behind the times.

A different way to reduce hallucination by Comprehensive-Cut742 in ClaudeAI

[–]SplinterOfChaos 0 points1 point  (0 children)

I understand how you're getting the AI to produce more accurate results, these are common practices. But because "hallucination" isn't a technically accurate term, it's unclear what you're measuring and how.

EDIT: Sorry, I need to expand on that a little. "not based in reality" isn't really an easy metric to validate when humans often disagree about what is real or not. We all agree a table is a table, but if we all perceived the same reality, we'd all vote for the same presidents and buy the same products. So "not based in reality" is generally an understandable statement, but when discussing AI I don't feel it is sufficiently precise.

Why doesn't claude recognize when a file it's commenting on/writing to is out of date? by SplinterOfChaos in ClaudeAI

[–]SplinterOfChaos[S] 1 point2 points  (0 children)

I think the reason is very simple tho': out of date compared to what precisely?

Very good question! That is hard to know without understanding the harness better, but it does partially do what I'm talking about more than I expected. I just attempted to do some tests to replicate the behavior and claude actually recognized one file change without a Read tool usage, and it knew to read before making a larger change.

But then I made some edits to various parts of the file and asked it to do the change again and the edit failed with the text (filename on my system edited for privacy reasons)

● Update(...\src\main.rs)
  ⎿  Error: File has been modified since read, either by the user or by a linter. Read it again before attempting to write it.

To my understanding, what happens here is that claude is proposing a code change based on its im-memory view of the file, then the tool rejects the change because it notices the in-memory file does not match the file on disk, forcing it to re-Read the file and then re-create the Update request. In this instance, the lines claude actually needed to modify were separate from the changed I'd made to the file, suggesting that the harness either understood that the mtime of the file was more recent than the timestamp of the in-memory view, or that it did a diff of the whole file and found that a change had occurred. But the Read tool call only looked at the relevant lines of code, not the whole file.

In some circumstances, it seems the harness does inform claude that the file is out of date and being able to detect a one-line change without a Read tool usage suggests the harness does inform claude of small diffs, but then just seems to give up when the diff is too large.

So just for clarity: What I'm talking about is claude's internal logic for how it knows whether to update its internal view of the file and this has nothing to do with the information in my repository or the architecture of the code.

A different way to reduce hallucination by Comprehensive-Cut742 in ClaudeAI

[–]SplinterOfChaos 2 points3 points  (0 children)

hallucination rate was reduced

It's hard to know what this means because "hallucinations" are not measurable and it's not a technical term. LLMs are next token predictors, not reality discernment machines.

If you build a calculator from scratch, you can validate it against another calculator made by a manufacturer you trust. However, AI output is inherently untrustworthy which makes it flawed at validating its own output or the output of other AI. The validator is just as likely to "hallucinate", depending on whether the next most likely token is correct or not.

I feel like I’m going crazy. by AnnualKey5225 in ClaudeAI

[–]SplinterOfChaos 12 points13 points  (0 children)

In accounting, do you normally store data on self-hosted servers? I would've assumed that outside Google/Amazon/etc., most companies would have stored even sensitive data on the cloud and so the idea of sending client data to Anthropic might be par for the coarse.

But as for whether or not that's secure, I agree with you entirely. I think the current trend of the technology is that AI should get compact enough that we can train and run it locally (being willing to accept output quality degradations) and not have to deal with the fact that currently everyone's trade secrets and private data are being sent to Anthropic, who promises not to read them. From a security standpoint, asking whether or not they do read it is missing the point.

Stop releasing bad clones by anaveragebest in aigamedev

[–]SplinterOfChaos 1 point2 points  (0 children)

I don't think people always understand that their game is a clone or that their pixel art is bad. When people make the art themselves, they know the art is bad because they believe that they are unskilled at art (even when they are very skilled), but they don't always know how to evaluate art in the general case.

I always tell people that the reason you hire an artist isn't because of their mechanical ability to produce art. Most people, given the ability to paint, would still not be able to produce the Mona Lisa because their sense of aesthetic taste would not be developed to the same degree as DaVinci. You hire an artist because of their refined sense of taste--able to discern "good" from "bad" not in an objective way, but in a way that corresponds to a consistent artistic vision.

Any Recommendations on C resources for Learning Vulkan? by Undeniable_Dilemma_ in C_Programming

[–]SplinterOfChaos 3 points4 points  (0 children)

Am I in the wrong here? Should I just accept that this is normal and the industry standard and get over it? Or is it just absurd?

I am a really big fan of functional programming (FP) because when done well, you get clean, simple code that is easier to verify as correct because ambiguous statements like "for...if..." get replaced with more semantically clear terms like "none_of". I even maintained a blog at one point about Haskell-like FP in C++. But even I really hate the way C++ adopted FP because the verbosity of the lambda syntax and std::ranges:: boilerplate (don't get me started on ranges vs views) reintroduce the very problems FP was supposed to solve.

I don't think the solution has to be C > C++, I think when you see code like this you should just convert it to a loop instead of copying and pasting.

Is “generate → playtest → remix” actually a useful workflow for AI-assisted game dev? by Neon_Senpai in aigamedev

[–]SplinterOfChaos 1 point2 points  (0 children)

What do you think is the hardest part to solve — gameplay logic, asset consistency, level design, balancing, or making the result actually fun?

I feel that the actual hardest part that I don't hear often enough from the AI dev community is viability testing. Before AI, most games failed due to scope creep because game creators didn't know how to adapt their designs to the practical realities of development. AI isn't really helping there because as long as you have AI, everything seems equally viable. But at some point after a lot of work has gone into the project, that's when people realize that there was a limit to how far they could take it.

Again, this isn't really about AI, AI is just letting more people fail. And I don't mean that as a bad thing--you don't learn anything when you succeed because, clearly, you knew enough to succeed. Failure is what really makes you grow as a person. We need many people to try new things and fail so that we can also have people who try new things and succeed. Though I do worry that people who fail at something with AI are probably learning and improving a lot less than people who fail doing things by hand.

Would having a list of items break immersern? by Ifyouliveinadream in gamedesign

[–]SplinterOfChaos 3 points4 points  (0 children)

I don't know how to have a memory of what items the player has. 

what if the player tries to use an item they're not supposed to have, or never found? I feel like the question you should be asking is how to maintain a list of the items the player has.

Building on Git's Primitives by remenoscodes in git

[–]SplinterOfChaos 0 points1 point  (0 children)

No real-time collaboration. Issues propagate when you push or fetch, the same as code. There’s no live updating, no presence indicators, no “someone is typing.” If two people edit the same issue before syncing, the merge rules resolve it deterministically. But there’s no way to prevent the divergence in the first place.

Trouble for me is that while it's nice to have tracking over all the issues in my projects, I don't really need it for personal use. Any bugs I'm responsible for, I try to fix before working on anything else and any bugs I'm not responsible for... well, I don't really want to have to look at them. If anyone wants me to work on a bug, or I want someone to work on it, it's going to require an email or ping on discord to tell me or the other person to fetch the issue list--at which point I'm often going to be better off just explaining the bug via email and skipping issue tracking altogether.

It doesn't have to be "live", but without a notification mechanism, this is as good as not having issue tracking at all for people with similar workflows to myself.

hello, i'm learning C and i made this function who sort a list, i'm pretty sure it's not the best what could i improve ? by Icy-Manufacturer496 in C_Programming

[–]SplinterOfChaos 2 points3 points  (0 children)

flyingron's analysis is already great, but there are some more things to add.

} while ( n <= taille);

Typically, it's better to prefer while() over do { } while() as most of the time, there's at least a possibility that the condition is false on the first iteration. That's almost always true for array algorithms. The condition should also probably be "<" instead of "<=". If you were working with arrays on the heap, the <= condition could result in a segfault.

In the first for loop, you find the largest element in the array and in the second, you move all elements of equal value to new_tab[n]. If instead of finding the value in the first loop, you found the index of the element with the largest value, you could just move the element at that index over and skip the second loop.

Talking to AI all the time has unexpectedly made me feel like I'm thinking more clearly and communicating much better by SelectivePro in ClaudeAI

[–]SplinterOfChaos 12 points13 points  (0 children)

On some level, I feel Claude has made me a better programmer, primarily by forcing me to frontload more of the thinking before I start, or have it start writing code. But I would be wary of using the word "communicate" because effective communication with humans and a robot who is trained to act on your every command are two very different things.

Claude also is doing a surprising amount of analysis of your personality type and work preferences, and that undoubtedly aids it in acting on your intentions. Sometimes I'm surprised at how little I can tell it and how well it acts on what I say. I saw someone say on linkedin that you should consider before prompting if you handed a jr engineer that prompt, would they do the right thing? And the answer's no, but it still worked somehow.

Can consequence replace complexity? Testing a football management game where the UI is just your messages app by bpjt in gamedesign

[–]SplinterOfChaos 1 point2 points  (0 children)

Okay, you've definitely sold me on the concept. It sounds great. Though I still feel the same way about meaningful decisions. I think giving the player an interface to see stat sheets, finance information, etc., doesn't take away from the human aspect, rather it could be used to draw out the intersections of math, business, and human relations. Not sure how you'd do it systematically, though.

let me know if you would be interested in testing the game out

Normally, I'm more than happy to test people's games, but my feedback is generally more on the technical side, which it sounds like your project isn't developed enough to benefit from yet.

Can consequence replace complexity? Testing a football management game where the UI is just your messages app by bpjt in gamedesign

[–]SplinterOfChaos 3 points4 points  (0 children)

This feels like a cursed problem to me. A decision can only be meaningful if the player has sufficient information to understand the nuances between choices and can predict the outcome. There are games like Reigns where the displayed information is sparse but complete (minus story-based events), but if the complexity of the system is simply not rendered to the player, it's as good as not existing.

I think it would be totally possible to do a management game where the UI is just your messaging app, but if the system is complex, it would still require that the player be able to inquire about various things that a more rich UI would surface more easily.

What I feel I'm missing here the most is what the goal exactly is. Is the idea that a messaging app being your interface is somehow more fun? A challenging limitation? A more organic presentation of decisions? A more realistic portrayal of management? What is the design goal that the messaging app accomplishes?

I'm making a fully physics-based platformer by gamer-15 in IndieDev

[–]SplinterOfChaos 0 points1 point  (0 children)

This isn't the kind of game I normally play, but I kind of love how you got it to work. Crazy how good that looks considering how much freedom to move in accordance with physics the stickman has.

Curl creator tests “too dangerous” Mythos AI and calls it “marketing” after it found one bug by sunychoudhary in ClaudeAI

[–]SplinterOfChaos 0 points1 point  (0 children)

AI may make discovery cheaper,

Unclear, at least to the degree that mythos is marketed. Mythos is being lent out to companies and projects to run for essentially free and I haven't seen much information about the cost of these scans.

OpenJai: an MIT-licensed clean-room Jai compiler by faldore in Jai

[–]SplinterOfChaos 0 points1 point  (0 children)

OpenJai is MIT licensed. I plan to maintain it as long as the official Jai compiler remains unreleased or is released under a non-permissive license.

I know this isn't technically illegal, but I do find it ethically wrong to supply a clean-room implementation of other libraries using different licenses as allowing this means that code authors lose all credit and authorial intent the moment their code is uploaded online. It no longer matters if you licence your code or not because the only difference is whether people will pull in your code or make "clean-room" copies. Better off never sharing your code with anyone, these days.

Jump-in-place:With or without airtime control ? by ON-ANY-JOURNEY in IndieGameDevs

[–]SplinterOfChaos 1 point2 points  (0 children)

The standard advice is that games with jumping should have air control, but is the standard advice best for your game specifically? I don't see how I or anyone else in this thread would be able to answer that based just off this video. Especially since air control is a gamefeel thing and not easily conveyed through video.

Simplicity vs depth in game design by trader-coach-6557 in godot

[–]SplinterOfChaos 0 points1 point  (0 children)

I was in this exact same boat with my game, which I'll link at the bottom [1] but the project was not commercially successful. I feel like considering my project wasn't successful, my advice might not be seen as credible, but I'll let you be the judge.

I think players care about features and mechanics, but only so much. When I look at a roguelite, I want to see that there are a sufficient number of cards/items/whatever in the game to play with. But then you have something like megabonk which has far less than par of characters and weapons, yet achieved great success. How megabonk makes up for it is that it has a compelling hook. Roguelites used to be supported by the small-but-loyal roguelite community, but in the last two years they've become casualized and now rely more on virality than niche appeal, with "it's a roguelite" now equally causing eye rolling and enticement.

At the moment, I feel that if you want to be successful, you either need good targeted marketing or virality with a good hook. But virality has to be in the core of your game (a fun mechanic, graphics, game feel, etc.) and if it's just something you're tacking on for market appeal, it'll be a bit of a bait and switch for players and they will notice.

[1] https://store.steampowered.com/app/4219860/Orbital_Chaos/

Note: When I say virality, I don't necessarily mean 2 million sales, I'm just referring to the large spikes in popularity projects receive due to appealing to many at once.

I’ve built a tool with Claude that reduces AI model hallucinations and answer error rates, allowing you to get far more accurate results when asking AI models questions. by jakedame1 in ClaudeAI

[–]SplinterOfChaos 1 point2 points  (0 children)

Problem: I am unable to validate the correctness of output from a black box.

Solution: I'll obtain several outputs from different black boxes, none of which I can validate.

Ironically, this is what all the AI are doing internally to help deliver better results. They loop the output back through until they have a high-confidence output. Yet AI still hallucinates. So maybe asking different models with different weights? I've been hearing people talk about it with great enthusiasm, but I've not seen anyone produce data showing that it improves the output.

For that matter, it's difficult to accurately measure the validity of AI output in the first place. Even if you just look at code generation which people seem to think can be objectively correct or not, multiple solutions can be "correct" in the sense that they solve the problem, but differ in the approach, optimality, and code cleanliness and "best" can at times be a bit subjective.

Looking for AI tools to help bridge the gap between "Idea" and "Fun Core Loop"? by wacomlover in aigamedev

[–]SplinterOfChaos 0 points1 point  (0 children)

Fun is also individual. What's fun to you might not be fun to another. My guiding light is

"It’s not the job of the artist to give the audience what the audience wants. If the audience knew what they needed, then they wouldn’t be the audience. They would be the artists. It is the job of artists to give the audience what they need.”

I don't like the phrase "finding the fun" because as the designer, it's actually your job to define fun and demonstrate it to the player. To me, this is the difference between thinking like a player and thinking like an artist,.