torebooth.blogg.se

Freeciv workers
Freeciv workers









  1. #Freeciv workers software#
  2. #Freeciv workers code#

The happiness value of a city has secondary impacts, including an effect on population growth of the city. The added rule states that if a player’s city is connected to a luxury item by a road, the happiness value of citizens of that city is increased. Luxuries are spe- cial resources that may be randomly found on the FreeCiv game map. We added a new rule involving luxury items. In our experiment, we changed the rules of FreeCiv. However, a problem with large cities is that citizens can become dissatisfied (unhappy). A typical strategy undertaken by the FreeCiv AI agent is to grow cities until they are big enough to support advanced technology research.

freeciv workers

The AI agent that is the target of our adaptation experiment comprises 20K lines of code. One component of the game is an AI game-playing agent used when not enough human players have joined the game. FreeCiv is written in the C programming language and includes 157K lines of source code. Winning the game is achieved most directly by destroying the civilizations of all opponents, but can also be achieved through more peaceful means by building a civilization with superior non-military characteristics, such as scientific development. The major tasks in this endeavor are exploration of the randomly ini- tialized game environment, resource allocation and development, and warfare that may at times be either offensive or defensive in nature.

freeciv workers

The aim in these games is to build an empire in a competitive environment. FreeCiv is an open source variant of a class of Civilization games with similar properties. We then evaluate the approach in the following section. To illustrate the approach, we first describe FreeCiv and then the scenario.

#Freeciv workers software#

We have studied the teleological approach to software adaptation by applying it to a specific adaptation scenario for the FreeCiv game.

#Freeciv workers code#

Using SAGi, the user can then request that the resulting code be compiled, linked and run. Finally, the fourth phase takes in the completely augmented AST translated from the original TMKL model and emits pretty printed code files. However, this retrospective adaptation is not yet implemented. This feedback will allow REMng to determine whether failure to achieve goals expressed in the TMKL model has occurred, and, if so, to start a retrospective adaptation process. Also during this phase, probes for produc- ing feedback events to be sent to REMng are inserted into the AST. To introduce these concerns, the third phase traverses the AST of the model and expands any domain concepts or operators with the necessary constraints. Examples include dynamic allocation and freeing of game resources, safe storage and retrieval of game objects, iteration over game objects or how a domain concept in the knowledge base is actually mapped into run- time elements in the game environment. Run-time details relevant to the execution of the model, but not necessarily its semantics, must now be reintroduced. At this point, constraints from the game environment and programming language are absent from the model.

freeciv workers

Nodes in the tree correspond to grammatical constructs in the target programming language. In the second phase, the elements of the model are translated into an abstract syntax tree (AST) representation. The first phase converts the TMKL elements into a type- checked semantic model. As a result, models and explanations of purpose can be expressed in a domain-specific manner, and the process of reasoning and adapting TMKL models can take place at a high level of abstraction. A secondary purpose is to provide infrastructure for abstracting away programming-language and implementation-specific details from TMKL models. The primary purpose of the code generation component of GAIA is to provide a mechanism for realizing the effects of adaptations during program execution. An example of REMng’s processing of an adaptation request is presented below in a section describing our case study. The TMKL model is correspondingly revised by propagating the effects of the changes to the original model, and the revised model is passed to the code generation component for translation into an executable form. The adaptation is completed by iteratively executing the adaptation plans that were successfully instantiated and ask- ing the user to confirm or reject each change. an abstract primitive Task is available in the pattern library, REMng is able to parameterize the adaptation pattern to form an adaptation plan, which in turn would instantiate the corresponding abstract primitive Task and the specific portion of the program code it points to and adjust them accordingly.











Freeciv workers