[SCRIPT] B2B: Mastering the Semi Products

Discussions about scenario games and user-defined scripts.
infoscott
Level 3 user
Posts: 64
Joined: Fri Mar 06, 2015 11:04 pm

[SCRIPT] B2B: Mastering the Semi Products

Post by infoscott »

Based on a B2B player challenge mentioned here:

http://www.capitalismlab.com/forum/view ... =13&t=2011 and
http://www.capitalismlab.com/forum/view ... b2b#p11593

I wrote this script to constrain a game to just the Semi Products.

Code: Select all

// Begin script B2B.txt

// Homage to B2B: The Middleman Report. This script was inspired by user [counting]'s comments as well as the CapLab thread at
// http://www.capitalismlab.com/forum/viewtopic.php?f=13&t=2011
// Created by user [infoscott] on 3/17/15.
// Written for Capitalism Lab version 2.6.34 Release

[HEADER]
Title=B2B Survive and Flourish
Description=Do you have what it takes to be a successful middleman? Retail and resources are off limits, so it is up to you to excel in the Semi Products class.

[ENVIRONMENT]
Number of Cities=7
Your Start-up Capital=Very High
Random Events=Never
Game Starting Year=1990
Retail Store Type=Many
Technology Disruption=Yes
Stock Market=No
Alternative Stock Sim=No
Macro Economy Realism=High
Inflation=Off

[COMPETITORS]
Number of Competitors=30
Competitor Start-up Capital=Very High
Competitor Aggressiveness=Very High
Competitor Expertise Level=High
Show Competitor Trade Secrets=Yes
AI Friendly Merger=Yes
Competence of Local Competitors=Low

// Trying to balance the competitor types to make for an optimum B2B environment.
// Tech is emphasized and agricultural minimized.
// AI companies will still dabble in agriculture in order to get the raw materials, such as leather goods.
// Unfortunately, I couldn't get this section to work in 2.6.34, perhaps better luck in 2.7.

// Retail Focused Companies=2
// Stock Focused Companies=2
// Real Estate Focused Companies=1
// Tech Focused Companies=2
// Media Focused Companies=1
// Diversified Companies=22
// AI Product Expertise=Apparel,1
// AI Product Expertise=Automobile,2
// AI Product Expertise=Beverage,0
// AI Product Expertise=Body Care Products,0
// AI Product Expertise=Communication Devices,2
// AI Product Expertise=Computer,2
// AI Product Expertise=Cosmetics,1
// AI Product Expertise=Drugs,1
// AI Product Expertise=Electronic Products,2
// AI Product Expertise=Food,1
// AI Product Expertise=Footwear,1
// AI Product Expertise=Furniture,0
// AI Product Expertise=Home Appliances,1
// AI Product Expertise=Household Products,1
// AI Product Expertise=Jewelry,0
// AI Product Expertise=Leather Goods,1
// AI Product Expertise=Leather Products,0
// AI Product Expertise=Photography Products,2
// AI Product Expertise=Snacks,0
// AI Product Expertise=Sports Equipment,1
// AI Product Expertise=Tobacco Products,0
// AI Product Expertise=Toy,2
// AI Product Expertise=Watch,1

[IMPORTS]
Consumer Goods Seaports=1
Industrial Goods Seaports=1
Constant Import Supply=No
Import Quality=Low

[PLAYER EXPERTISE]
// The player should have enough advantage here in R&D, training, and manufacturing in the early game to...
// ...establish a tech and production lead over the AI. The AI will generally have better expertises than this.
Retailing=0
Farming=0
Manufacturing=40
Research and Development=40
Raw Material Production=0
Marketing=0
Training=60
// The player may still be assigned a random product class expertise.


// Goals are intentionally omitted in order to allow a more open ended play style.
// There should be sufficient challenge in keeping up with the AI players as the markets mature.

[LOCKS]
// All firms and buildings are locked out except those which contribute to manufacturing semi products.
Firm, Retail Store
Firm, Farm
Firm, Logging Camp
Firm, Mine
Firm, Oilwell
Firm, TV Station
Firm, Newspaper Publisher
Firm, Radio Station
Firm, Apartment
Firm, Commercial Building
Firm, Civic Building
Firm, Sports Facilities

// Finished products are all locked down, but in the UNLOCKS section the Semi Products are turned back on.
Product=All

[UNLOCKS]
Product=Semi Products

// End script B2B.txt

infoscott
Level 3 user
Posts: 64
Joined: Fri Mar 06, 2015 11:04 pm

Re: [SCRIPT] B2B: Mastering the Semi Products

Post by infoscott »

Note that Lab does not consider Frozen Chicken or Eggs as Semi Products, even though they are needed to make some Food class finished goods. However it does consider Flour a Semi Product. It appears the rule is that if the product can be sold as is in a Retail firm, it's not a Semi Product.
infoscott
Level 3 user
Posts: 64
Joined: Fri Mar 06, 2015 11:04 pm

Semi Products Analysis

Post by infoscott »

Here is a breakdown of the available semi products and their inputs.

Available Semi Products (20):
CCD => Silicon
CPU => Silicon
Car Body => Glass, Plastic, Steel => Silica, (Oil, Chemical Mineral), (Coal, Iron)
Citric Acid => Lemon
Coconut Oil => Coconut
Corn Syrup => Corn
Dyestuff => Oil, Timber
Electronic Components => Chemical Minerals, Silicon, Steel => Chemical Minerals, Silica, (Coal, Iron)
Engine => Steel => (Coal, Iron)
Flour => Wheat
Glass => Silica
Linen => Flax
Paper => Timber
Plastic => Oil
Polyester => Oil, Chemical Minerals
Silicon => Silica
Steel => Coal, Iron
Textiles => Cotton
Wheat Germ Oil => Wheat
Wheel & Tire => Rubber, Steel => Rubber, (Coal, Iron)

Extraction raw materials needed (6):
Silica
Oil
Chemical Minerals
Coal
Iron
Timber

Agricultural raw materials needed (7):

Coconut
Corn
Cotton
Flax
Lemon
Rubber
Wheat

Comments:
1) If a player wanted to store and distribute every semi product and corresponding raw material, it could be done with 11 warehouses, each having a 3x config of Input->Storage->Output
2) I doubt it would be worth distributing the following agricultural product; Linen (Flax), Flour (Wheat), Corn Syrup (Corn), or Textiles (Cotton). My experience has been that AIs with product expertise in the corresponding industries tend to vertically integrate anyway, and don't look for external sources.
3) The script does allow you to speculate in stockpiling farm raw materials, such as wool and leather. A person could use an otherwise unneeded warehouse to silo wool for sale during the non-shearing season. It would be a crude way to implement a futures market! :lol:
4) Agricultural inputs used in non-aggy industries, like corn syrup for cough syrup, should be pretty lucrative. I see this as a way to make money in the first few years while researching the more tech oriented semis.
counting
Level 8 user
Posts: 843
Joined: Wed Jan 29, 2014 12:44 am
Been thanked: 1 time

Re: Semi Products Analysis

Post by counting »

infoscott wrote: 3) The script does allow you to speculate in stockpiling farm raw materials, such as wool and leather. A person could use an otherwise unneeded warehouse to silo wool for sale during the non-shearing season. It would be a crude way to implement a futures market! :lol:
There has been discussion about commodities futures market in the past.
http://www.capitalismlab.com/forum/view ... 8457#p8313

Players in fact can run a success wholesaler warehouses by integrating various upper stream, artificially create shortage, then make a killing in profit.
-------------------------------------------------------------------
Twitch channel : twitch.tv/ancientbuilder
Youtube channel : www.youtube.com/user/countingtls
-------------------------------------------------------------------
counting
Level 8 user
Posts: 843
Joined: Wed Jan 29, 2014 12:44 am
Been thanked: 1 time

Re: [SCRIPT] B2B: Mastering the Semi Products

Post by counting »

Textile and linen are crucial semi-product that actually have large enough demand if there are enough AIs competing to create a huge demand fashion market. Farming related product's problem is always related to upstream farm's quality and supply quantity. Usually there are not enough AI invest enough in farming in the first decade. Unless you get lucky to have a lot of specific AIs have high expertise in farming are all CEOs in the starting corporations and their specialty are NOT fashion related, and fashion related AI has low farming rating. (I'm not sure if script can be this specific in picking AIs)

The success of semi-product market isn't always about their type, but their demand quantity. Those has low demand quantity goods are difficult to cut in, as well as those low quality impact, or high raw material freight cost semi-product.

I've proposed a interesting idea for a MOD to design a huge one class product that can generate large enough downstream retail demand , and high unit price (like cars or electronics), with a long vertical production chain. But from my initial test, AIs performed poorly where there are too many semi-products, even if you break them down into several sub-classes. But it could be a result of of not enough semi-products existed or their default profit-margin plus setup overhead doesn't balance. It's very difficult to build a extensive mod and calculate their balance just right.
-------------------------------------------------------------------
Twitch channel : twitch.tv/ancientbuilder
Youtube channel : www.youtube.com/user/countingtls
-------------------------------------------------------------------
infoscott
Level 3 user
Posts: 64
Joined: Fri Mar 06, 2015 11:04 pm

Re: [SCRIPT] B2B: Mastering the Semi Products

Post by infoscott »

counting wrote:...Usually there are not enough AI invest enough in farming in the first decade. Unless you get lucky to have a lot of specific AIs have high expertise in farming are all CEOs in the starting corporations and their specialty are NOT fashion related, and fashion related AI has low farming rating. (I'm not sure if script can be this specific in picking AIs)...
This script is specific in picking AI product expertise, but I had to comment it out because it seemed to be causing AIs to drop out on initialization under the current version. Given the bias in past B2B challenges I weighted the product expertise towards high tech product classes. But it would be easy enough to weight more towards the fashion industry if the bugs can be worked out in CapLab 2.7 and later.
counting
Level 8 user
Posts: 843
Joined: Wed Jan 29, 2014 12:44 am
Been thanked: 1 time

Re: [SCRIPT] B2B: Mastering the Semi Products

Post by counting »

infoscott wrote:
counting wrote:...Usually there are not enough AI invest enough in farming in the first decade. Unless you get lucky to have a lot of specific AIs have high expertise in farming are all CEOs in the starting corporations and their specialty are NOT fashion related, and fashion related AI has low farming rating. (I'm not sure if script can be this specific in picking AIs)...
This script is specific in picking AI product expertise, but I had to comment it out because it seemed to be causing AIs to drop out on initialization under the current version. Given the bias in past B2B challenges I weighted the product expertise towards high tech product classes. But it would be easy enough to weight more towards the fashion industry if the bugs can be worked out in CapLab 2.7 and later.
Script can pick product expertise, but can not pinpoint skill expertise for individual AI CEO, especially can not put combination of product expertise with certain skill expertise. That would be quite crucial to build specific scenarios. You can specified combination to player's skill and product expertise though, so this could be implemented for AIs. Perhaps we should suggested this feature to be added.
-------------------------------------------------------------------
Twitch channel : twitch.tv/ancientbuilder
Youtube channel : www.youtube.com/user/countingtls
-------------------------------------------------------------------
infoscott
Level 3 user
Posts: 64
Joined: Fri Mar 06, 2015 11:04 pm

Test run ended early, lessons learned

Post by infoscott »

Did a trial run of the B2B script, but had to end it early. The AI had already beat me to market with Electronic Components, and it was probably in the first one to three years or so. In counting's Middleman Report, he did research in the first five years and went to market in years six and seven. With the challenge settings I have in the script, that may be too late. Silly me to start with Glass as my first product.

So here is how I started in order to gain and maintain a tech, production, and financial lead on the AIs.

Most of my cash was spent on buying land plots around the downtown area of the lowest wage cost city. I'll be filling these in with warehouses and factories once production is ready, and then relocate these firms mid-game using the Flight to the Suburbs strategy. All the loans are reserved for early year losses and for manufacturing and warehouse buildings to put on the raw land. Five research firms were set up with the following techs being studied:

1) 10 Years, 1 tile each: CCD, CPU, Car Body, Engine, Wheel & Tire, Linen, Electronic Components [1 firm and a 2-tile from the next list]
2) 5 Years, 2 tiles each: Citric Acid, Coconut Oil, Corn Syrup, Paper [1 firm, and a 3-tile from the next list.]
3) 3 Years, 3 tiles each: Dyestuff, Flour, Glass, Polyester, Silicon, Textiles, Wheat Germ Oil [2 firms]
4) 3 Years, 4/5 tiles each: Steel, Plastic [1 firm]

This puts most of the researches to yield around 50 tech points arriving in 3 to 10 years, depending on when I think the tech will be needed (keep in mind with expertise I'm getting all my R&D labs starting at Level 3). All labs are set to max training. After the test, I realized that there needs to be a sixth lab with Electronic Components alone (9 tiles) set to research 6 months, then 1 year, then 2 year increments thereafter. The idea here is to establish an early tech lead on these and keep it. There may need to be more than five R&D firms in the midgame, but those can be added later when cash flow is better.

By the way, I'm especially keen on 1 tile, 10 year research programs as it's the most efficient research if you know you have the lead times. Going to 2 or 3 linked tiles wastes 30% of the second and third firm's productivity, and of course researching in shorter time periods also costs you tech points in the final product. The goal here is to research all 20 semi products with as little expense as possible, taking advantage of "dead time" when available.

I'll try another test and see if I can beat the AIs to market with semi products.
counting
Level 8 user
Posts: 843
Joined: Wed Jan 29, 2014 12:44 am
Been thanked: 1 time

Re: [SCRIPT] B2B: Mastering the Semi Products

Post by counting »

I didn't point out in my old post, is that I didn't choose electronic components randomly, but a calculated gamble. The first thing into a game, I always pause to analysis every AI's cash position for the first half to a month, and their expertise, their preferences, and "imagine" myself as every one of them. I can get a pretty good guess from experience as to how likely each of them would grow into. In that particular game, I "felt" a lot of the need for electronics related downstream products, and especially computers, communications, and camera, and some non-related expertise diversify AIs already go into home appliances. Another crucial indicator is to observe what they are researching, and how many R&D they have, see if there will be giants in 3CE products. Some retail AIs already opening electronic stores from the start. Also due to the seaports already providing some reasonable quality electronic components, hence AIs could produce lower quality goods from the start, so I am sure AIs would NOT invest in electronic components research for a while (AI usually only starts to research a semi-product, when they are already producing it, or when they can not get reasonable quality of them, even if they are already producing it, they usually won't mass producing it for years, and you could normally beat them if you have better supply and quality if you play your cards right). The point of cutting in the business in year 5, is n estimation due to the need of the related products are quite concentrated, but not totally (some specific product, like desktop computers are been research by several AIs from the start, so I am sure there will be a tech race and product race in the future), and I sense 3 to 5 years is about the right time where electronics business will likely to expense to a point and begin to diversity, and their competitions between each others will drive up demand of common semi-products in great number, in 12 to 15 years, the new products will be out and heavily contested. I tried to min-max by only having one R&D, instead of covering every possible semi-products, since this would give me more residual cash when I am about to cut-in in 5 years and can still hold out to 10 years if necessary (this is the gambling part, without too much backup options). And due to the low freight cost, the location of factories and warehouses is relatively irrelevant, AIs will buy from me all around the world no matter what.

Although I like your detail planned try to cover as many angles as possible. However, not sure how you could support 5 even 6 R&D from the start up to 5 years or more. Even using land value increase as leverage, I imagine the cash pressure will be immense after just 3 years, it would be wildly difficult to start at year 5, and not possible to sustain till year 10. Unless you are willing to issue as many shares as possible and gamble to be able to control your own corporation with minimum share holdings percentage.
-------------------------------------------------------------------
Twitch channel : twitch.tv/ancientbuilder
Youtube channel : www.youtube.com/user/countingtls
-------------------------------------------------------------------
infoscott
Level 3 user
Posts: 64
Joined: Fri Mar 06, 2015 11:04 pm

Re: [SCRIPT] B2B: Mastering the Semi Products

Post by infoscott »

counting wrote:I didn't point out in my old post, is that I didn't choose electronic components randomly, but a calculated gamble. The first thing into a game, I always pause to analysis every AI's cash position for the first half to a month, and their expertise, their preferences, and "imagine" myself as every one of them. I can get a pretty good guess from experience as to how likely each of them would grow into. In that particular game, I "felt" a lot of the need for electronics related downstream products, and especially computers, communications, and camera, and some non-related expertise diversify AIs already go into home appliances. Another crucial indicator is to observe what they are researching, and how many R&D they have, see if there will be giants in 3CE products. Some retail AIs already opening electronic stores from the start. Also due to the seaports already providing some reasonable quality electronic components, hence AIs could produce lower quality goods from the start, so I am sure AIs would NOT invest in electronic components research for a while (AI usually only starts to research a semi-product, when they are already producing it, or when they can not get reasonable quality of them, even if they are already producing it, they usually won't mass producing it for years, and you could normally beat them if you have better supply and quality if you play your cards right). The point of cutting in the business in year 5, is n estimation due to the need of the related products are quite concentrated, but not totally (some specific product, like desktop computers are been research by several AIs from the start, so I am sure there will be a tech race and product race in the future), and I sense 3 to 5 years is about the right time where electronics business will likely to expense to a point and begin to diversity, and their competitions between each others will drive up demand of common semi-products in great number, in 12 to 15 years, the new products will be out and heavily contested. I tried to min-max by only having one R&D, instead of covering every possible semi-products, since this would give me more residual cash when I am about to cut-in in 5 years and can still hold out to 10 years if necessary (this is the gambling part, without too much backup options). And due to the low freight cost, the location of factories and warehouses is relatively irrelevant, AIs will buy from me all around the world no matter what.

Although I like your detail planned try to cover as many angles as possible. However, not sure how you could support 5 even 6 R&D from the start up to 5 years or more. Even using land value increase as leverage, I imagine the cash pressure will be immense after just 3 years, it would be wildly difficult to start at year 5, and not possible to sustain till year 10. Unless you are willing to issue as many shares as possible and gamble to be able to control your own corporation with minimum share holdings percentage.
Yeah... tried twice with with 5 - 6 R&D centers, and was burning 2 million in cash per month. Could last about 3 years before bankruptcy. On the current game I'm up to 22 years, and even at 10 years there would have been barely enough free cash flow to cover 2 million. There just isn't a strong enough revenue stream in semis to support that kind of expense.

As it turns out, mid-game has the AIs getting into price wars with each other anyway. Tech/quality doesn't matter if you can't hit their price points. Right now I've seen nearly all my lines drop off to very little revenue, except CPUs where I have a monopoly. I'll try to run this test game to year 25 and then upload for folks to see what a B2B game looks like.
Post Reply