Would you want us to explore the possibilities of developing a simple scripting system for AI companies in the game?
With such a system, the users will be able to write simple scripts to influence AI behaviors.
Simple scripting for AI
-
- Level 4 user
- Posts: 129
- Joined: Tue Nov 20, 2012 8:04 pm
- David
- Community and Marketing Manager at Enlight
- Posts: 10463
- Joined: Sat Jul 03, 2010 1:42 pm
- Has thanked: 78 times
- Been thanked: 233 times
Re: Simple scripting for AI
Here is an example provided by Megapolis:
There is a solution to this. And it is called events. I should have an ability so set customizable triggers to every firm and aspect of the game. For example I set up a trigger to tell me if I sell less than $250k worth of Smartphones in Department Store #298. Once it will happen, I will get an event. I will change something and postpone this trigger for a month, several months or a year.
Or I need to keep my tennis courts coverage at 30%. Once it will be below that, I will have an event. Then again I will change something and mute the trigger for several months.
Or I will set a reminder when company X shares will drop below $50 combined with mandatory trigger to ping me if it will not drop below $50 in 7.5 months.
In addition to displaying an alert window when a trigger occurs, the AI scripting system will allow the player to edit the script in-game and direct the AI handle to specific trigger events in ways designated in scripts.
With such a system, you will spend less time doing micromanagement, and more time formulating strategy and executing them with the help of AI, and script writing may even become a popular in-game activity!
In fact, these can be the fundamental ideas of a potential new DLC which may potentially transform Capitalism Lab into a grand strategy game, as the scripting and AI will be able to take the micromanagement workload off from the player, allowing the player to concentrate on grand strategy gameplay that includes building more cities and growing the nation. And new features on the national and city levels can be introduced in the future, further reinforcing the game's evolution in this direction.
Please let us know your thoughts on this. When this poll has gathered 30 positive votes, preliminary design work on this may commence.
There is a solution to this. And it is called events. I should have an ability so set customizable triggers to every firm and aspect of the game. For example I set up a trigger to tell me if I sell less than $250k worth of Smartphones in Department Store #298. Once it will happen, I will get an event. I will change something and postpone this trigger for a month, several months or a year.
Or I need to keep my tennis courts coverage at 30%. Once it will be below that, I will have an event. Then again I will change something and mute the trigger for several months.
Or I will set a reminder when company X shares will drop below $50 combined with mandatory trigger to ping me if it will not drop below $50 in 7.5 months.
In addition to displaying an alert window when a trigger occurs, the AI scripting system will allow the player to edit the script in-game and direct the AI handle to specific trigger events in ways designated in scripts.
With such a system, you will spend less time doing micromanagement, and more time formulating strategy and executing them with the help of AI, and script writing may even become a popular in-game activity!
In fact, these can be the fundamental ideas of a potential new DLC which may potentially transform Capitalism Lab into a grand strategy game, as the scripting and AI will be able to take the micromanagement workload off from the player, allowing the player to concentrate on grand strategy gameplay that includes building more cities and growing the nation. And new features on the national and city levels can be introduced in the future, further reinforcing the game's evolution in this direction.
Please let us know your thoughts on this. When this poll has gathered 30 positive votes, preliminary design work on this may commence.
-
- Level 3 user
- Posts: 50
- Joined: Wed Sep 12, 2018 8:58 pm
Re: Simple scripting for AI
Sounds decent. Does this apply to the AI companies too? My biggest issue is that AI is too weak, not much competition in late games, especially in modsDavid wrote: ↑Sun Nov 10, 2019 3:50 pm Here is an example provided by Megapolis:
There is a solution to this. And it is called events. I should have an ability so set customizable triggers to every firm and aspect of the game. For example I set up a trigger to tell me if I sell less than $250k worth of Smartphones in Department Store #298. Once it will happen, I will get an event. I will change something and postpone this trigger for a month, several months or a year.
Or I need to keep my tennis courts coverage at 30%. Once it will be below that, I will have an event. Then again I will change something and mute the trigger for several months.
Or I will set a reminder when company X shares will drop below $50 combined with mandatory trigger to ping me if it will not drop below $50 in 7.5 months.
In addition to displaying an alert window when a trigger occurs, the AI scripting system will allow the player to edit the script in-game and direct the AI handle to specific trigger events in ways designated in scripts.
With such a system, you will spend less time doing micromanagement, and more time formulating strategy and executing them with the help of AI, and script writing may even become a popular in-game activity!
In fact, these can be the fundamental ideas of a potential new DLC which may potentially transform Capitalism Lab into a grand strategy game, as the scripting and AI will be able to take the micromanagement workload off from the player, allowing the player to concentrate on grand strategy gameplay that includes building more cities and growing the nation. And new features on the national and city levels can be introduced in the future, further reinforcing the game's evolution in this direction.
Please let us know your thoughts on this. When this poll has gathered 30 positive votes, preliminary design work on this may commence.
- David
- Community and Marketing Manager at Enlight
- Posts: 10463
- Joined: Sat Jul 03, 2010 1:42 pm
- Has thanked: 78 times
- Been thanked: 233 times
Re: Simple scripting for AI
We have just released the new post-release beta version v6.1.00. It comes with a few AI improvements. You may download the new version from https://www.capitalism2.com/forum/viewt ... 769#p28769Sounds decent. Does this apply to the AI companies too? My biggest issue is that AI is too weak, not much competition in late games, especially in mo
- David
- Community and Marketing Manager at Enlight
- Posts: 10463
- Joined: Sat Jul 03, 2010 1:42 pm
- Has thanked: 78 times
- Been thanked: 233 times
Re: Simple scripting for AI
This poll has gathered 15 positive votes, so here is the next step:
Let's first explore the possibility of using a script for affecting AI's behavior in setting/changing product prices. Price setting is more straightforward than other aspects of AI and it is logical that we start with an easy goal initially.
Please let us know if you have any good ideas on this.
Let's first explore the possibility of using a script for affecting AI's behavior in setting/changing product prices. Price setting is more straightforward than other aspects of AI and it is logical that we start with an easy goal initially.
Please let us know if you have any good ideas on this.
-
- Level 2 user
- Posts: 27
- Joined: Mon Feb 09, 2015 4:42 pm
Re: Simple scripting for AI
David, is it at all possible to change a mayor's behaviour when selling land via a script option?
The ability would greatly help issues within the boom bust cycle, as sales cause massive negative growth.
The ability would greatly help issues within the boom bust cycle, as sales cause massive negative growth.
- David
- Community and Marketing Manager at Enlight
- Posts: 10463
- Joined: Sat Jul 03, 2010 1:42 pm
- Has thanked: 78 times
- Been thanked: 233 times
Re: Simple scripting for AI
Any more concrete thoughts on how this can be implemented? What kinds of mayor's behaviors in regard of selling land that you have in mind?
Re: Simple scripting for AI
I think AI is weak because it has no business choices. Businesses need to be prioritized and protected from players.
-
- Posts: 13
- Joined: Thu Aug 10, 2017 9:55 am
Re: Simple scripting for AI
Here's a basic pseudocode for my approach to price-setting:
Initial start: Set price to 15 points above market average rating
If sales utilization >90% set price to 10 points above market rating
If total market share of product above 75% set to 10 points above market rating
If supply limited set price to 5 points above market rating
If Competitor in market, set price to competitor's rating
If own product, increase price by 2 points.
Even with this limited pseudocode, the triggers are quite varied and would indicate a significant structure to be in place to give adequate coverage to even price setting
Here's a couple of other variables / events that could be needed:
Current product total supply (own company & global)
Predicted product total supply (own company & global)
Number of entrants in market (local & worldwide)
Current profit
Predicted profit
Same product sold in city price
Store profit
other product profit in store
Avg product profit per sales unit (own company & global)
Supply sources (volumes, price, freight, quality, brand) (own company & global) (local & worldwide)
Ability to create new variables (eg: If competitor found, PriceWar = True)
Initial start: Set price to 15 points above market average rating
If sales utilization >90% set price to 10 points above market rating
If total market share of product above 75% set to 10 points above market rating
If supply limited set price to 5 points above market rating
If Competitor in market, set price to competitor's rating
If own product, increase price by 2 points.
Even with this limited pseudocode, the triggers are quite varied and would indicate a significant structure to be in place to give adequate coverage to even price setting
Here's a couple of other variables / events that could be needed:
Current product total supply (own company & global)
Predicted product total supply (own company & global)
Number of entrants in market (local & worldwide)
Current profit
Predicted profit
Same product sold in city price
Store profit
other product profit in store
Avg product profit per sales unit (own company & global)
Supply sources (volumes, price, freight, quality, brand) (own company & global) (local & worldwide)
Ability to create new variables (eg: If competitor found, PriceWar = True)