• AnarchistArtificer@slrpnk.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 hours ago

    I’m not so much talking about machine learning being implemented in the final game, but rather used in the development process.

    For example, if I were to attempt a naive implementation of procedurally generated terrains, I imagine I’d use noise functions to create variety (which I wouldn’t consider to be machine learning). However, I would expect that this would end up producing predictable results, so to avoid that, I could try chucking in a bunch of real world terrain data, and that starts getting into machine learning.

    A different, less specific example I can imagine a workflow for is reinforcement learning. Like if the developer writes code that effectively says "give me terrain that is [a variety of different parameters], then when the system produces that for them, they go “hmm, not quite. Needs more [thing]”. This iterative process could, of course, be done without any machine learning, if the dev was tuning the parameters themselves at each stage, but it seems plausible to me that it could use machine learning (which would involve tuning model hyperparameters rather than parameters).

    You make a good point about procedural generation at runtime, and I agree that this seems unlikely to be viable. However, I’d be surprised if it wasn’t used in the development process though in at least some cases. I’ll give a couple of hypothetical examples using real games, though I emphasise that I do not have grounds to believe that either of these games used machine learning during development, and that this is just a hypothetical pondering.

    For instance, in Valheim, maps are procedurally generated. In the meadows biome, you can find raspberry bushes. Another feature of the meadows biome is that it occasionally has large clearings that are devoid of trees, and around the edges of these clearings, there is usually a higher rate of raspberry bushes. When I played, I wondered why this was the case — was it a deliberate design decision, or just an artifact of how the procedural generation works? Through machine learning, it could in theory, be both of these things — the devs could tune the hyperparameters a particular way, and then notice that the output results in raspberry bushes being more likely to occur in clusters on the edge of clearings, which they like. This kind of process would require any machine learning to be running at runtime

    Another example game is Deep Rock Galactic. I really like the level generation it uses. The biomes are diverse and interesting, and despite having hundreds of hours in the game, there are very few instances that I can remember seeing the level generation being broken in some way — the vast majority of environments appear plausible and natural, which is impressive given the large number of game objects and terrain. The level generation code that runs each time a new map is generated has a heckton of different parameters and constraints that enable these varied and non-broken levels, and there’s certainly no machine learning being used at runtime here, but I can plausibly imagine machine learning being useful in the development process, for figuring out which parameters and constraints were the most important ones (especially because too many will cause excessive load times for players, so reducing that down would be useful).

    Machine learning certainly wouldn’t be necessary in either of these examples, but it could be something that could make certain parts of development easier.

    • AdrianTheFrog@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 hours ago

      Sure, I could definitely see situations where it would be useful, but I’m fairly confident that no current games are doing that. First of all, it is a whole lot easier said than done to get real-world data for that type of thing. Even if you manage to find a dataset with positions of various features across various biomes and train an AI model on that, in 99% of cases it will still take a whole lot more development time and probably be a whole lot less flexible than manually setting up rulesets, blending different noise maps, having artists scatter objects in an area, etc. It will probably also have problems generating unusual terrain types, which is a problem if the game is set in a fantasy world with terrain that is unlike what you would find in the real world. So then, you’d need artists to come up with a whole lot of datat to train the model with, when they could just be making the terrain directly. I’m sure Google DeepMind or Meta AI whatever or some team of university researchers could come up with a way to do ai terrain generation very well, but game studios are not typically connected to those sorts of people, even if they technically are under the same company of Microsoft or Meta.

      You can get very far with conventional procedural generation techniques, hydraulic erosion, climate simulation, maybe even a model of an ecosystem. And all of those things together would probably still be much more approvable for a game studio than some sort of machine learning landscape prediction.