New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move remains of HackyAI to BotModules #15922

Merged
merged 2 commits into from Dec 31, 2018

Conversation

Projects
None yet
3 participants
@reaperrr
Copy link
Contributor

reaperrr commented Dec 20, 2018

This PR splits the remaining parts of HackyAI to a SquadManagerBotModule, UnitBuilderBotModule and McvManagerBotModule and dissolves the AI namespace.

Note: The problem that AIs have trouble attacking when shroud/fog are enabled and the target is out of sight isn't new and not caused by this PR.

Depends on #15921.

Fixes #15968.

@reaperrr reaperrr added this to the Next Release milestone Dec 20, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Dec 27, 2018

Rebased and updated.

@reaperrr reaperrr force-pushed the reaperrr:modAI-SquadManager branch from ca5c99e to 776f47f Dec 28, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Dec 28, 2018

Updated as discussed on IRC.

get
{
// Unless we have no barracks (higher priority), require a 2nd refinery.
// TODO: Possibly unhardcode this, at least the targeted minimum of 2 (the fallback can probably stay at 1).

This comment has been minimized.

@pchote

pchote Dec 28, 2018

Member

General thought for future improvements: IMO it would be much better to have the yaml list N build orders for each of M build phases (initial base setup, tech up, expanding eco, banking power) that the bots picks from. The current random order influenced by fraction / limit / priority bodges really sucks.

@pchote
Copy link
Member

pchote left a comment

A few more thoughts on the code:

Show resolved Hide resolved OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs Outdated
Show resolved Hide resolved OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs Outdated
Show resolved Hide resolved OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs Outdated
Show resolved Hide resolved OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs Outdated
Show resolved Hide resolved OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs Outdated
Show resolved Hide resolved OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs Outdated
Show resolved Hide resolved OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs Outdated
Show resolved Hide resolved OpenRA.Mods.Common/Traits/BotModules/UnitBuilderBotModule.cs Outdated
Show resolved Hide resolved OpenRA.Mods.Common/Traits/BotModules/UnitBuilderBotModule.cs Outdated
Show resolved Hide resolved OpenRA.Mods.Common/TraitsInterfaces.cs Outdated

@reaperrr reaperrr force-pushed the reaperrr:modAI-SquadManager branch from 776f47f to 6fd48ff Dec 28, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Dec 28, 2018

Updated.

@pchote
Copy link
Member

pchote left a comment

One last small code change, then I think the code details are probably reasonable.
This doesn't rule out fundamental logical issues - will need testing to check for these.

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Dec 29, 2018

Updated.

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Dec 30, 2018

Just a thought: In my opinion the perf overhead of a ModularBot without any modules enabled should be low enough that we might as well remove DummyBot entirely.
Your stance @pchote?

@pchote

This comment has been minimized.

Copy link
Member

pchote commented Dec 30, 2018

Definitely not in this PR

reaperrr added some commits Nov 14, 2018

Split off last bot modules
And dissolve AI namespace.
There would have been so little left in Common.AI,
that keeping it made no sense anymore.

@reaperrr reaperrr force-pushed the reaperrr:modAI-SquadManager branch from 93d5353 to 54b6dd1 Dec 30, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Dec 30, 2018

One more tiny update: I made the minimum number of construction yards that a bot aims for configurable (instead of hardcoding 1), which also makes testing that module easier (by setting a value higher than 1, so the initial cyard doesn't prevent the AI from using the module until it loses that cyard, at which point it may fail to finish a replacement due to factory destruction or lack of funds).

@pchote

pchote approved these changes Dec 31, 2018

@pchote pchote merged commit d179f6e into OpenRA:bleed Dec 31, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment