AI Improvement
Moderators: thunderchero, Iceman
AI Improvement
I've made a small patch for the AI to allow it to explore. (Without using large amounts of CPU power) If I get the time, I hope to do some more modifications on the AI to bring it closer to single player usability.
- Attachments
-
- UnitAI.zip
- (4.56 KiB) Downloaded 163 times
Re: AI Improvement
Thanks Tracing!
I'll include these changes in the next release.
Keep it coming.
I'll include these changes in the next release.
Keep it coming.
Re: AI Improvement
wow great. many thanks i cant wait to try it.
Re: AI Improvement
Tracing, one nice improvement to this would be to have MaxExploreRange get the Range value for the Scout in question - which depends on tech level. I was actually working on something similar for the number of colony ships the ai builds. I wasn't very successful yet though...
Re: AI Improvement
Thanks for the tip. I've made the changes the ai file. I'm currently in the process of creating a couple of new features in the UnitAI file around ship roles and fleet assignments. It should probably make the SP universe a little bit more lively.Tracing, one nice improvement to this would be to have MaxExploreRange get the Range value for the Scout in question - which depends on tech level. I was actually working on something similar for the number of colony ships the ai builds. I wasn't very successful yet though...
I'm looking forward to the next release. Hopefully it will come soon
Re: AI Improvement
Cool!
The next release is probably going to be in a couple of weeks, for xmas. Not that that is mandatory though
I've made a slight change to your code, so that only empires' Scouts actually explore. That's because I've made the minors build some scouts too, and there was a boatload of scouts flying around the galaxy... Hope you don't mind.
Other changes, not AI related, are some tweaks to galaxy generation (trying to minimize some weirdnesses), decreased PFs costs so that higher level colonies are easier to manage, reworked ships scanner ranges again, fixed a few things in combat (and more to come), fixed a couple rare crashes.
I have yet to polish Agents, and some other stuff.
The next release is probably going to be in a couple of weeks, for xmas. Not that that is mandatory though
I've made a slight change to your code, so that only empires' Scouts actually explore. That's because I've made the minors build some scouts too, and there was a boatload of scouts flying around the galaxy... Hope you don't mind.
Other changes, not AI related, are some tweaks to galaxy generation (trying to minimize some weirdnesses), decreased PFs costs so that higher level colonies are easier to manage, reworked ships scanner ranges again, fixed a few things in combat (and more to come), fixed a couple rare crashes.
I have yet to polish Agents, and some other stuff.
Re: AI Improvement
While at it, those scouts should probably return to the homesystem after all the systems in range are explored, else they'll just remain wherever they explored last - which includes other civs' homesystems
Re: AI Improvement
The next release will include the mentioned improvements (scouts use their own range for exploration purposes, and they return home after all systems in range are explored). Scouts will also avoid BHs and NSs if they're detected.
The AI should also only build as many colony ships as needed, but that part is not working correctly yet.
The AI should also only build as many colony ships as needed, but that part is not working correctly yet.
Re: AI Improvement
Tracing, any news on this?Tracing wrote: I'm currently in the process of creating a couple of new features in the UnitAI file around ship roles and fleet assignments. It should probably make the SP universe a little bit more lively.
It'd be really nice for the next release!
Re: AI Improvement
I'm sorry about my short absence. I had some real life events (i.e. exams) that I needed to take care of and for the last month i've been quite engrossed in doing my studies so making/distributing code hasn't been a very high priority for me lately.Tracing, any news on this?
It'd be really nice for the next release!
The revisions I was making got sort of abandoned, since the code became quite large and unwieldy, and is pretty non-functional when I try to test it.
Anyway, I made a few (other) code improvements at about early may, which i'm going to put here:
http://www.mediafire.com/download/78e4i ... 8-06-15.7z
Changes:
- AI should build combat ships and transports and will send half of those ships to invade enemy territory if they are at war.
- AI should declare war on minor races.
- Some code for making the AI build shipyards and dilithium refineries, but this isn't working yet.
Notes:
- I commented out a line in SupremacyService.cs because keeping it in would cause the game to crash whenever the AI launches an invasion.
- AI only tries attack systems that are within fuel range. If I can remember correctly I believe that this is working fine, but there may be some rough edges that need to be stamped out.
- The diplomatic ai has been somewhat stripped down, but I believe that most of the code that I commented out should be functional, I might get to this abit later.
Re: AI Improvement
Sweet! I will integrate this into the next build. Thanks!
Re: AI Improvement
Managed to make the AI build dilithium structures (will have a go at shipyards tomorrow), and assign the necessary pop to energy structures for any shipyards and dilithium structures that aren't powered.- Some code for making the AI build shipyards and dilithium refineries, but this isn't working yet.