AI: Death, Birth, and Traveling

I was thinking and I thought about it the AI death and birth method. A problem came up that kept bugging me, which is that since there is a max population, the birth would have to wait on the deaths and traveling. The other problem was that the birth and death would be based on the country and there would still need to be max population birthed. I was thinking of doing each of the players countries, but I think it would be better with this other approach.

The choices of the population will be based on fuzzy logic and the birth and death will be based on generic AI. The choices will be based off of Neural Networks AI in the future. The child birth will have to use generic AI since it will inherit the characteristics from the two “parents.” The popularity may also use Generic AI, depending on how well the simple approach works.

Note: I may make note of the number 5 in the sections in reference to the minimum limit of population. This is no way what will be decided when the game is finished. It could be 10, 20, or even 50 per player. Percentages are used in replacement on some cases in reference to the minimum population cap, these should be used instead.

Every Hour

Country Popularity Weight

The popluarity is how well, the overall population takes to each country. It gives each country the ratio for how the sims like the country. A high ratio means that the population is less likely to travel outside and more likely to travel inside of it. It also gives an indication on how many births are going to take place in the country. Each time the popularity is taken, it will be recorded for the player to see, and the daily ratio will be of all of the ratios during that day, which will be used for the birthing and recorded.

Traveling

This is dependent on each country and what they have set up in their options. Even if the traveling is restricted leaving, a percentage will still be able to escape and a smaller percentage will be killed doing so (if the controls is turned up to take that action. If the population is killed, then it would have to wait until the population is born again. The traveling population will be placed together and each one will decide where they want to go (just not back to where they came), based on the popularity and how well each of the sim takes to the country. The country with the highest popularity will get first pick and then each of the other countries will have a go going from the top to the bottom, until the traveling population reaches 0.

If a country has restricted access for criminals or set a limit to how many can enter the country, then the tests will also be done. If the sim is a criminal, then it doesn’t keep 100% of that kind out, a small percentage will be able to get in. The population will enter a country (if it has an extremely high popularity) until the limit (if there is one is taken up.

If a country has reached the minimum population limit, then the country can’t lose any more of its population, meaning no one can travel outside, but can travel inside.

The amount of sims that traveled (successfully or unsuccessfully or killed) will be recorded, so that the player can keep track of that information to judge how well, he is doing.

Deaths

Every Four Hours

Deaths from crime, lack of food, age, or health will be calculated every four hours. Death from wars is another factor, but that won’t be solved at this moment and will most likely be planned at the time it is being implemented.

Age

Each of the sims will be given an age that will determine what actions they will take. If the age is between 0-16, then it won’t take an active role in anything. Ages over 16 will be able to mate. Internally, statistically speaking a 65 year old would be able to mate with a 16 year old, unless that control is enacted that only 18 and above can mate, then those between 12 and 17 will mate or the age would temporary be moved up. This is done so that there is a great chance of birth taking place in a country with a small amount of sims (which has to have at least 60% females and 40% males of adult status of the minimum).

Food

If there isn’t enough food to feed the population (which is hard to come by, unless there is disaster or war or crime) then the younger population will start to die off.

Crime

Deaths from crime are rare, it is more that the criminals themselves are killed, depending on how the government functions and the rules for crime. If a criminal kills another and the government decides to kill that sim, then the country loses two members. It is better to kill off criminals because criminals breed criminals and crime. The criminal has to commit a crime first, and if the penalty is too high, then the chance of that happening is even rarer.

Health

Once a population has reached the cap where health is a governmental concern, then health facilities have to be built to improve how long the population will live. This equals out the countries with the big population and makes it harder for them to keep the population.

Every Day

Births

Births will take two parents and combine their characteristics into one child. It takes two sims in a country, both male and female to create a child that is either male (40%) or female (60%). Which characteristics the child gets is random. It there are more deaths then births then the cap won’t be filled, but the deaths should be decreased until the population cap has been reached. Also, if the gender percentages are off by more than 10% than the gender will be set until the gender percentages are back in place.

Age

Every day, the ages of the population will be moved up. The limits on how long a sim can live depends on the health (when the population gets high enough), food supply, and happiness. The absolute limit will be 200 years of age, but if there are only the minimum population, then the citizens can live longer than that. The old population will then live until the new population reaches the point double of the minimum (where the new population can sustain itself), then the old population will die in their sleep.

Jobs

Jobs or the lack of a job (depending on the population) will be changed, depending on the working age of the sims. The country would be able to set the age when the population can work. Child labor will decrease how long the sim will live. The lack of a job for the citizen should start around the same time the health becomes a factor.

New Resource

Every Month Could be changed to every two weeks.

Every player will get a free resource in their land, and will get a new one for being in the game. It is debatable whether to do it in a cron job, where a player can sign up exactly when the cron job is going to take place, but it is long enough to where it could be set in the game code to trigger based on the last time it occured, and when the player registered. I will implement both and test which one is better, but keep both anyway.

In some way, the resource that the player already has, will grow, to supply more. How this will be implemented will be difficult. It would allow more trade routes or give more to the player to stockpile to sell or trade with other players. The different resources will be needed by all players, depending on their tech tree. The resource required by the company will most likely be given first and then get other resources also needed by the company.

Possibly Related Posts:


2 Comments.

  1. Who really now is engaged in the control of health? To mine it neglected the large pharmaceutical companies and the medical centers. There should be a centralized management WBR LeoP

  2. @Matt

    Did you even read the post? If so, did you realize that it is about gaming and AI?