Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2 3

Author Topic: Could we get better AI via machine learning?  (Read 4245 times)

Pappus

  • Lieutenant
  • **
  • Posts: 87
    • View Profile
Could we get better AI via machine learning?
« on: April 27, 2021, 02:59:24 PM »

They are getting pretty advanced by now, maybe Alex can cook something up? The generations can run on the side until they are the full menace & ready to obliterate us.

Maybe only for redacted ships  ;D
Logged

WeiTuLo

  • Captain
  • ****
  • Posts: 312
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #1 on: April 27, 2021, 03:56:28 PM »

It would wreck us though.
Logged

oooh_senpai

  • Lieutenant
  • **
  • Posts: 76
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #2 on: April 27, 2021, 10:40:07 PM »

Thousands of computers like your's will have to run tens and hundreds of thousands of battles on it's maximum perfomance. And it will not guarantee better result. And will work only for ships trained for (if will work at all). Only against ships they trained for. And hand-code script optimising won't be an option anymore. Machine learning is about pressing random buttons without real understanding what and why is happening around, so it works best for simplest mechanics (there it can lead to perfection) or for stuff that programmer don't know how to be scripted (sooner or later it will learn to some condition).
Logged

Talkie Toaster

  • Captain
  • ****
  • Posts: 259
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #3 on: April 28, 2021, 03:47:22 AM »

They are getting pretty advanced by now, maybe Alex can cook something up? The generations can run on the side until they are the full menace & ready to obliterate us.

Maybe only for redacted ships  ;D
It's kind of sad this is still a better structured ML project outline than I've gotten from actual university researchers.
Logged

Pappus

  • Lieutenant
  • **
  • Posts: 87
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #4 on: April 28, 2021, 03:57:39 AM »

Thousands of computers like your's will have to run tens and hundreds of thousands of battles on it's maximum perfomance. And it will not guarantee better result. And will work only for ships trained for (if will work at all). Only against ships they trained for. And hand-code script optimising won't be an option anymore. Machine learning is about pressing random buttons without real understanding what and why is happening around, so it works best for simplest mechanics (there it can lead to perfection) or for stuff that programmer don't know how to be scripted (sooner or later it will learn to some condition).

Machine learning can be done in the cloud. I give you an example the machine learning program that learned no limit poker on levels better than humans did cost 150$ in computational power (cloud service).

Machine learning doesn't mean that it has to compute massively.
Logged

TaLaR

  • Admiral
  • *****
  • Posts: 2798
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #5 on: April 28, 2021, 04:17:12 AM »

ML is a whole different field of expertise. Amount of effort is not be underestimated either - look at AlphaStar team for example (Starcraft 2 AI). I think it's too much to expect in SS.
Logged

nathanebht

  • Lieutenant
  • **
  • Posts: 93
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #6 on: April 28, 2021, 06:21:51 AM »

The AI often flies ships better than I do. Its also gets more damage than me from weapons with narrow cones of fire.

If the AI was better at ship loadouts and was better at concentrating fire, I'd definitely lose more ships.
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7231
  • Harpoon Affectionado
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #7 on: April 28, 2021, 08:54:29 AM »

The one thing I think machine learning would be especially suited for is the Admiral AI: identifying vulnerable targets for eliminate orders, when to bunch up, how to distribute force, etc. In many ways those are contextual image classification and outlier detection, which machine learning is good at (given LOTS of training time). Things like the actual ship maneuvering and handling I don't think ML is particularly suited for.
Logged

KDR_11k

  • Admiral
  • *****
  • Posts: 666
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #8 on: April 28, 2021, 10:40:45 AM »

Machine learning actually seems like something that would make sense for auto-resolve between non-player fleets since it's a single decision and a clear training path (observe the standard AI doing a ton of battles and see what results come out of it, use that to estimate the results of simulated battles) so once trained it could be used with a relatively sane amount of computing power. However that training will take a lot of time and would need to be redone for any balance changes or mods added.

Realistically I don't see an ML AI doing the combat maneuvers. Those demonstrations you see from the big companies require massive datacenters to do the processing, not your home computer.

Also it won't be used for second-in-command since that seems strictly designed to never kill your own ships no matter how underpowered the detachment you send is.
Logged

NoMercyForLudds_

  • Ensign
  • *
  • Posts: 48
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #9 on: April 28, 2021, 02:26:47 PM »

They are getting pretty advanced by now, maybe Alex can cook something up? The generations can run on the side until they are the full menace & ready to obliterate us.

Maybe only for redacted ships  ;D
It's kind of sad this is still a better structured ML project outline than I've gotten from actual university researchers.

Coming up with projects for students is often problematic. Some students expect clear instructions, some want to work on their thing, others are over-enthusiastic and hugely underestimate the amount of effort they'd need to put it, and so on. Plus, the work/results that students produce is almost always poor quality, can can't be published or re-used, so there is little incentive for the university researchers to invest time in such projects.

Using ML in SS may be unrealistic - even if Alex abandons everything else and keeps working on this - because the resulting "AI" (we are long way away from real AI) may be impossible to easily tweak (and this is just one hurdle I can think of - and I'm only marginally related to ML). You won't be able to look at some undesirable behavior (say, a small/quick AI ship running circles around the map, and making a trivial battle last half an hour) and know which variable/function/equation to adjust and how.

In any case, somebody would need to "look under the hood" and figure out if the problem/task can be formulated in principle, so it's suitable for our current ML methods (without a complete re-write of SS battle code). If yes, maybe Alex could hire an intern for a summer...

Any computer science students out here would like to volunteer? You'll need to do your internship anyway, so better work on smth you're passionate about...
Logged

Pappus

  • Lieutenant
  • **
  • Posts: 87
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #10 on: April 28, 2021, 02:41:12 PM »

They are getting pretty advanced by now, maybe Alex can cook something up? The generations can run on the side until they are the full menace & ready to obliterate us.

Maybe only for redacted ships  ;D
It's kind of sad this is still a better structured ML project outline than I've gotten from actual university researchers.

Coming up with projects for students is often problematic. Some students expect clear instructions, some want to work on their thing, others are over-enthusiastic and hugely underestimate the amount of effort they'd need to put it, and so on. Plus, the work/results that students produce is almost always poor quality, can can't be published or re-used, so there is little incentive for the university researchers to invest time in such projects.

Using ML in SS may be unrealistic - even if Alex abandons everything else and keeps working on this - because the resulting "AI" (we are long way away from real AI) may be impossible to easily tweak (and this is just one hurdle I can think of - and I'm only marginally related to ML). You won't be able to look at some undesirable behavior (say, a small/quick AI ship running circles around the map, and making a trivial battle last half an hour) and know which variable/function/equation to adjust and how.

In any case, somebody would need to "look under the hood" and figure out if the problem/task can be formulated in principle, so it's suitable for our current ML methods (without a complete re-write of SS battle code). If yes, maybe Alex could hire an intern for a summer...

Any computer science students out here would like to volunteer? You'll need to do your internship anyway, so better work on smth you're passionate about...

You don't need to look at those quirks. You can either use reinforcement learning or genetic. Both have solutions to this problem and neither takes insane time and both still allow to change the behaviour with a layer on top of it in case something absolutely undesireable does come up.

Alex already has everything he needs except the ML code itself, which at this point exists in plugin variants to be purchased aswell. He even has the simulation space ready already, which he could maybe even decouple from graphics to make it blazing fast.

Reinforcement learning is the way to go I think. Award for high damage, penalty for little moving, award for working in tandem, small penalty for dying and so on. The whole point of this is that it teaches itself gradually, so Alex can start a generation and let it do its thing and work on something else and unload the new redacted menace with 1.0 on us.
Logged

oooh_senpai

  • Lieutenant
  • **
  • Posts: 76
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #11 on: April 28, 2021, 05:30:10 PM »

However that training will take a lot of time and would need to be redone for any balance changes or mods added.
It's actually a real problem, it will delay every update a lot. And some people use rebalance and content mods..
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24149
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #12 on: April 28, 2021, 05:58:18 PM »

Hah, I don't want to rain on this parade! It's a fun thing to speculate about.

But chopping the graphics off the simulation would speed it up somewhere in the neighborhood of 2x. I'd say the game is not fundamentally simpler than Starcraft 2 - some things are easier, some more complicated - and IIRC just replicating the training for *that* would cost something like $12 million. I think it might actually be a lot more complicated due to the almost infinite variety of starting conditions and ship loadouts.

But that does ignore I think the bigger problem. Well, maybe not bigger because the cost and feasibility are pretty big problems in their own right. But: the model produced is a black box; you can't really say why it does X or Y. And the corollary to that is that a fairly innocuous balance change could conceivably break it in some circumstances. (Assuming it was even possible to train it on a wide enough range of situations that it worked reasonably well to begin with, which I suspect would prove a challenge even with unlimited resources...)

And then finally, finally! I suspect that a well-trained AI would be an extremely annoying kiting sob. How do you even set training goal metrics when the goal is "subjectively fun to fight against", not "best possible performance"?

I could be wrong about some of these things! But probably not, I think, all of them - and each alone makes the undertaking a complete non-starter.
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #13 on: April 28, 2021, 11:11:03 PM »

2 additions to that: what would be the performances with a fully trained AI? I'm not certain I want an always online game connected to a cloud supercomputer. And wouldn't that just kill mods entirely since it would have to be trained for any mod configuration?
Logged
 

intrinsic_parity

  • Admiral
  • *****
  • Posts: 3071
    • View Profile
Re: Could we get better AI via machine learning?
« Reply #14 on: April 28, 2021, 11:51:47 PM »

AI is generally very fast to run, it's the training that is expensive.

Also, for what it's worth, IIRC the StarCraft AI was not pure reinforcement learning because that actually didn't work. They had to use supervised learning with a pro-player as the target (basically trying to copy them) to initialize the AI and then they used reinforcement learning to try and improve from that starting point. I definitely wouldn't expect it to just work without a ton of effort/investment.

On the other hand, I think the ability to run simulations programmatically without graphics would be kinda useful for a lot of other testing and optimization beyond training AI.
Logged
Pages: [1] 2 3