aliens

Author Topic: [WIP][SOURCEMOD][OXCE] Brutal-AI  (Read 12339 times)

Offline Anon011

  • Sergeant
  • **
  • Posts: 42
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #60 on: December 19, 2022, 11:30:10 pm »
Thanks! Let me know how it's going or ideally share some footage! :D
Sure ill try to whip something up next week.
Btw do you have any plans for different versions of brutal AI for different units?
Sectoids having different AI from Reapers or Mutons for example?
I dont know if thats even possible, just asking out of curiosity.

Btw its seriously astonishing how you made this within a month of learning about openxcom  ;D
Thats some real talent

Offline anonynamja

  • Squaddie
  • *
  • Posts: 6
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #61 on: December 22, 2022, 08:54:45 am »
Btw do you have any plans for different versions of brutal AI for different units?
Sectoids having different AI from Reapers or Mutons for example?
This is a great idea. Maybe something like a berserker type profile for reapers and zombies that leeroy charge towards enemies without regard for danger, versus an assassin type profile for lids and other close combat fighters that take cover while closing the distance

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 568
    • View Profile
    • Email
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #62 on: December 22, 2022, 10:14:29 pm »
https://github.com/Xilmi/OpenXcom/releases This took a while. I rewrote almost all of the movement-logic and then spend some days on making it not only more readable but also actually perform at least as good as before.
I think the playing-strength is better in most scenarios now or I need to adapt better to their playstyle. They are now particularly good at punishing indecisiveness.

Please report if you see the AI make big tactical blunders. Especially ones that it didn't make before.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 568
    • View Profile
    • Email
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #63 on: December 22, 2022, 10:51:29 pm »
Sure ill try to whip something up next week.
Btw do you have any plans for different versions of brutal AI for different units?
Sectoids having different AI from Reapers or Mutons for example?
I dont know if thats even possible, just asking out of curiosity.

Btw its seriously astonishing how you made this within a month of learning about openxcom  ;D
Thats some real talent
While different units don't have different AI, the AI will treat different units differently. Granted their differences warrant a noticable difference in potential play-style.

I can tell what the differences are:

The "standard"-behaviour is for aliens that can move by walking and that have a ranged-attack. Since there's no noticable difference between a sectoid and a muton here, they basically behave the same.

Then there's the melee-case. This is obviously used by aliens that only have melee attacks but also by Cyberdisks and aliens that at some point primed their grenade before having an opportunity to throw it. Once they have thrown it, they will go back to the standard-behaviour. Melee units are more reckless and try to get in your face instead of hiding. The reason is that they need to be decisive in order to achieve something. Cyberdisks obviously will still use their ranged-attack whenever they have the opportunity. The difference in behaviour is when they can't.

Flying units, while using the standard-behaviour for the most part, are very well aware of the utility of being able to fly, especially that this means they can not become target of grenades and attack from unusual angles. So they behave noticably different.

Aliens with a blaster-launcher also have a different behaviour. Unlike the standard-aliens they will generally not try to get too close. I think their behaviour is the most likely to have more room for improvement. But since they are bot rare and devastating it's hard to experiment with them in normal settings. I'd have to make a mod or so to see how they act in isolation. A potential way to improve them is to probably treat them more like mind-controlled units in the sense that they rather blow themselves up with the enemy instead of doing nothing. Doing nothing while cornered as a blaster-user usually means you'll die anyways or worse get captured and interrogated. So they probably should be more trigger-happy.

Well, thanks again for the compliment. I've picked up the hobby of writing AI for games in 2014 or so. I'd say the practice and experience gained in that time helped a lot in getting more confident and skilled in doing so for new games. I've usually done it for 4x-games. So compared to those X-Com is a project of smaller scope. But then again it's tactical layer has a lot more depth than that of games where you fight on a 2-dimensional 9x9 grid. In small-scale tactical-scenarios it's much easier to simulate the outcome of different actions. In X-Com-battlescape that would be way too computation-heavy so I had to find some work-arounds to do things that I otherwise would want to simulate. AI work is also very 80:20-rule heavy. Usually you can do a lot of significant improvement in very little time but then there's a lot of diminishing returns in the time-invested:observable-difference-ratio.

The effort for 2.0 in hindsight feels barely worth it.

What people call "talent" usually comes down to someone having become passionate about what they are doing. Being passionate about something is what leads to intrinsic motivation and with intrinsic motivation everyone can grow beyond themselves.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 568
    • View Profile
    • Email
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #64 on: December 22, 2022, 11:13:28 pm »
This is a great idea. Maybe something like a berserker type profile for reapers and zombies that leeroy charge towards enemies without regard for danger, versus an assassin type profile for lids and other close combat fighters that take cover while closing the distance
I temporarily was at a point where melees would also take cover unless they were sure to get to their target. And while it worked well for Crysalids due to their massive amount of time-units, it usually was not working too well for reapers. I didn't really think about making a distinction here. The other point is that crysalids just have such awesome stats that they are absolutely terrifying with either behaviour.
Also note that my AI is about cooperation between units and units can wait for other units to act. That makes melee-units behaving differently than ranged-units really potent. The melee-units scout and the ranged-units can then snipe away at what was scouted.

I'd rather have a trait based on which I could determine which behaviour to employ under what circumstance. Reapers are just horrible. Their 2x2 size makes them easier targets and prevents them from accessing many hiding spots in the first place. So they don't really have a choice than playing scouts and distractions for the floaters. Crysalids could very well be more sneaky and be even more terrifying that way. For zombies it's hard to say. They could hide well but lack the speed to pounce. Beelining for the enemy seems reasonable for them.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 568
    • View Profile
    • Email
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #65 on: December 23, 2022, 07:12:40 pm »
2.0.1 available with a bunch of smaller fixes mostly to melee-units.

https://github.com/Xilmi/OpenXcom/releases

Fixed melee units looking in the wrong direction after moving.
Blaster-users are more likely to use their weapon even if it might mean to kill themselves.
Only units on the same level are taken into account for making sure units keep their distance from each other to avoid inviting AoE-attacks. This leads to faster initial deployment for aliens to get where they want to be on the map.
Fixed an issue with melee-units not attacking in some circumstances.
The geoscape-option "enhanced dogfighting-behaviour" is now enabled by default.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 568
    • View Profile
    • Email
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #66 on: December 27, 2022, 10:44:11 pm »
Note that I have now created a new thread here:

https://openxcom.org/forum/index.php/topic,10967.0.html

As I consider the bulk of the work on this done.

Offline psavola

  • Commander
  • *****
  • Posts: 570
    • View Profile
    • Email
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #67 on: November 28, 2023, 01:53:36 pm »
To make the BAI more accessible and easily usable in various environments without a need to compile it yourself, I wonder if it would be possible to build the binaries on a regular basis on some build farm (Like Win32, Win64, and Bionic like with OXCE at https://lxnt.wtf/oxem/#/Extended - initially there were, but they have since then been abandoned at https://lxnt.wtf/oxem/#/ExtendedTests). Or have I missed anything and is it already available somewhere (I'm interested in binaries usable in Linux in particular.)

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 568
    • View Profile
    • Email
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #68 on: December 17, 2023, 01:57:30 pm »
To make the BAI more accessible and easily usable in various environments without a need to compile it yourself, I wonder if it would be possible to build the binaries on a regular basis on some build farm (Like Win32, Win64, and Bionic like with OXCE at https://lxnt.wtf/oxem/#/Extended - initially there were, but they have since then been abandoned at https://lxnt.wtf/oxem/#/ExtendedTests). Or have I missed anything and is it already available somewhere (I'm interested in binaries usable in Linux in particular.)
Yes, this is something I'd very much like to have. I would really appreciate if someone could help me get this working.
I vaguely remember that back then there was an issue with how I used GitHub. Like it would work once and then whatever I did messed it up and building again required me a lot of manual work. So it's only been built twice or so.

For my other project someone made me this:

https://github.com/Xilmi/Rotp-Fusion/actions/workflows/release.yml

Here I can just click on "Run Workflow" and it compiles directly on the GitHub-Server.

Offline Juku121

  • Commander
  • *****
  • Posts: 1509
  • We're all mad here.
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #69 on: December 17, 2023, 02:39:13 pm »
Congrats on the new subforum!

You might want to make a locked+stickied thread for one or more of: general information, download/installation instructions, changelogs.

Also, the readme at Github doesn't seem to mention the AI :o, while the feature list here (in addition to being in two separate threads now, which makes it ???) does not mention the 'rejected features' nor Realistic Accuracy.



Edit: Oh, yeah, and the invasion of the bear-creatures from Alpha Centauri has also been dealt with. ;D
« Last Edit: December 17, 2023, 05:59:48 pm by Juku121 »