Programming the AI

Discussions about scenario games and user-defined scripts.
Post Reply
Steve
Level 2 user
Posts: 15
Joined: Thu Jan 24, 2013 5:29 pm

Programming the AI

Post by Steve »

I think it would be interesting to be able to script the behavior of one single AI opponent.
Define events like OnNewMineDiscovered, OnNewCompanyStarted.

Then you can script what the AI will do, for instance:

Code: Select all

public class InvestorAI
{
  private void OnNewCompanyStarted(Company company)
  {
    if (this.enoughCash)
    {
      this.buyShares(company, 100);
    }
  }
}
counting
Level 8 user
Posts: 843
Joined: Wed Jan 29, 2014 12:44 am
Been thanked: 1 time

Re: Programming the AI

Post by counting »

Script system opened for modding can make a game, and a lot of time break a game as well. However, if it's open for modding, it could greatly reduce the work load for developers. However, I imagine Capitalism AI is probably quite difficult for normal modder to tackle on.

Personally I would like the AI to be more adaptive. Certain learning ability would be nice (I believe it would required some advanced machine learning algorithm). Sometimes I feel sorry for AIs when I tricked them over and over again with the same tactic.
-------------------------------------------------------------------
Twitch channel : twitch.tv/ancientbuilder
Youtube channel : www.youtube.com/user/countingtls
-------------------------------------------------------------------
Post Reply