Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] (PR#6975) Update of TODO and README.AI
Home

[Freeciv-Dev] (PR#6975) Update of TODO and README.AI

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6975) Update of TODO and README.AI
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Fri, 28 Nov 2003 08:16:12 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6975 >

This patch updates TODO and README.AI to current development realities.

Take a look.

  - Per

Index: doc/TODO
===================================================================
RCS file: /home/freeciv/CVS/freeciv/doc/TODO,v
retrieving revision 1.5
diff -u -r1.5 TODO
--- doc/TODO    2003/11/11 09:54:24     1.5
+++ doc/TODO    2003/11/28 16:14:05
@@ -2,73 +2,7 @@
 THINGS TO DO
 ============
 
-Freeciv is quite mature, and we think its already a great game,
-but there are always things to add or improve.  This file lists
-some new features which are being worked on, or are planned, or
-desired.  (See also the file BUGS, for some known deficiencies.)
-
-TODO:
-=====
-
-- Server-side player scripting.
-
-- Diplomacy:
-  * Senate
-  * AI handle diplomacy
-
-- Better graphics for city styles.
-
-- Better internationalization (fix some problems, modify those
-  English sentences which can not be translated into most other
-  languages, better gui handling for different-length words,
-  mixed language client-server, more complete translations,
-  more languages).
-
-- Make the rulesets for City Improvements and Wonders more flexible.
-
-- Make the code view-agnostic: remove assumptions about which tiles are
-  valid. Fx the assumption that the map wraps in the x direction. This
-  can be done by making the code use macros like whole_map_iterate and
-  square_iterate. It would also be nice to remove the assumption that
-  the x values go [0..map.xsize[, as a proposed isometric numbering
-  scheme doesn't have that property.
-  When all code is converted the whole of the freeciv server can be
-  adjusted to use a flat map, an isometric map, a torus map or maybe
-  even a hex map, all by changing a very limited amount of code in
-  the right places.
-  Note that the AI in various places do not adjust tiles properly even
-  for the current numbering scheme.
-  Note that the conversion is backwards compatible, so it can be done in
-  small steps. No mega-patches please.
-
-- Stop the server from sending text to the clients. Instead it should
-  send an enum and some values, which the client converted to a message
-  to show to the user. This will give the client more knowledge of the
-  content of the messages, needed for fx a client side AI. It will also
-  mean that the messages are automatically correctly localized.
-  Note that these new messages will have to sometimes contain city names.
-  A possibility of sending text should still exist, to avoid
-  compatability breakage when changing the server.
-
-- Create a new "ocean" variable in the tile struct, similar to the
-  "continent" variable. It needs assisiated functions to be kept up to date
-  in both the server and the client. It should also have an associated
-  function is_oceans_connected(ocean1, ocean2, player) that returns if
-  a city exists that connects the two oceans for that player.
-
-- Document/cleanup AI code. Rename variables to more saying names than these:
-  int a=0, b, c, d, e, m, n, v, f, b0, ab, g;
-  (taken from ai/aiunit.c:find_something_to_kill())
-  I would especially like to have the use of the amortize() function in
-  server/settlers.c documented.
-  I will apply patches even if they just rename a single variable.
-
-- Implement goto in common code
-
-FURTHER INFORMATION:
-====================
-
-Information on other projects, and the Freeciv development
-"roadmap", are available at the Freeciv website:
-
-        http://www.freeciv.org/
+Freeciv is quite mature, and we think its already a great game, but
+there are always things to add or improve.  Check out the TODO page on
+http://www.freeciv.org or wish list items on http://rt.freeciv.org for
+things that need to be done.
Index: doc/README.AI
===================================================================
RCS file: /home/freeciv/CVS/freeciv/doc/README.AI,v
retrieving revision 1.9
diff -u -r1.9 README.AI
--- doc/README.AI       2003/05/31 16:30:21     1.9
+++ doc/README.AI       2003/11/28 16:14:05
@@ -23,31 +23,20 @@
 
 The Freeciv AI is widely recognized as being as good as or better
 militarywise as the AI of certain other games it is natural to compare
-it with.  It does, however, lack diplomacy and can only do war.  It is
-also too hard on novice players and too easy for experienced players.
+it with.  It is, however, still too easy for experienced players.
 
-The code base is not in a good state.  It has a number of problems,
-from very messy and not very readable codebase, to many missing
-features to some bugs, which aren't easy to fix due to unreadable
-code.  The problem is, that most the code was written by someone who
-didn't care about code readibility a lot.  After he left the project,
-various people have contributed their own mostly unfinished hacks
-without really fixing the main issues in the AI code, resulting in
-even more mess.
-
-Another problem is that not all code is residing in ai/ (which is
-currently still linked to a server, but there're plans to separate
-this completely to some kind of client, working name is "civbot"), but
-it is also dissolved in little chunks in the whole server/.  Aside
-that, server/settlers.c is only AI stuff - the problem is, that most
-of it is used also for the autosettlers, so we can't separate it from
-the server.
-
-This file aims to describe all such problems, in addition to various
-not entirely self-describing constants and equations used in the code
-commonly.
+The code base used to in bad good shape but it has gotten a lot 
+better.
 
+Not all code is residing in ai/, but it is also dissolved in little 
+chunks in the whole server/.  Aside that, server/settlers.c is only AI 
+stuff - the problem is, that most of it is used also for the 
+autosettlers, so we can't separate it from the server.  
+server/gotohand.c is a left-over from the previous path-finding system 
+which is slowly being phased out.
 
+
+
 CONTACTING THE CURRENT AI DEVELOPERS
 ====================================
 
@@ -64,32 +53,8 @@
 
 The long-term goals for Freeciv AI development are
  -> to create a challenging and fun AI for human players to defeat
- -> to create modular AI code that can easily be assembled into new AI
-    clients
- -> to have multiple different AI clients compete against each other
-
-In order to get to this point, the current AI code will be moved from the
-server and to the client. This requires that the AI code is separated
-completely from the server, and that clients get the (optional) 
-possibility of an omniscience cheat.
-
-An important step is to move the goto code into the client. Also, the
-current CMA agent will split out its core calculations for use in
-client-side AI that do not use agents.
-
-The final directory structure should look like this:
-
- client/agents      - this is agent territory
- client/ai          - this is where AI implementations go
- client/ai/common   - this is where common AI code should go
- client/ai/XYZ      - AI implementation named XYZ
-
- server/            - no AI code allowed
- ai/                - removed
-
-While code is being moved and integrated, we will link the AI in the
-server with client/ai/common/libaicommon.a and client/ai/XYZ/libxyz.a, 
-making a gradual progress of files and features possible.
+ -> to create an AI that can handle all the rules possibilities that
+    Freeciv can offer
 
 
 WANT CALCULATIONS
@@ -222,22 +187,17 @@
 
 DIPLOMACY
 =========
+
+The AI's diplomatic behaviour is current only regulated by the 
+'diplomacy' server setting.
 
-At the moment, the AI cannot change its diplomatic state.  The AI
-starts out in NO_CONTACT mode, and proceeds to WAR on first-contact.
+In default rules, the AI starts out in NO_CONTACT mode, and proceeds 
+to NEUTRAL on first-contact.
 
-However, AI understands the notion of "ally" and if, by some trickery
-("teams" patch or direct savegame hacking), it is put in an alliance
-with another player, it will stick to this allience.  Thus, AI knows
-about friendly units and cities, and does not consider them to be
-either targets nor dangers.  Caravans are sent to friendly cities, and
-ships that do not have targets are sent on a goto to the closest
-allied port for the hull to get mended and for the crew to rest and
-befriend local girls.
-
-AI is currently totally trusting and does not expect diplomatic states
-to ever change.  So if one is to add active diplomacy to the AI, this
-must be changed.
+AI is not very trusting for NEUTRAL and PEACE modes, but once it hits 
+ALLIANCE, this changes completely, and it will happily hand over 
+any tech and maps it has to you.  The only thing that will make the AI 
+attack you then is if you build a spaceship.
 
 For people who want to hack at this part of the AI code, please note
  * pplayers_at_war(p1,p2) returns FALSE if p1==p2
@@ -256,24 +216,20 @@
 can be very difficult to write diplomacy that is useful for and not in
 the way of modpacks.  Which means diplomacy either has to be optional,
 or have finegrained controls on who can do what diplomatic deals to
-whom, set from rulesets.
+whom, set from rulesets.  The latter is not yet well implemented.
 
-But one possibility for diplomacy that it would be easy to introduce,
-is an initial PEACE mode for AIs under 'easy' difficulty.  This can be
-turned to WAR by a simple countdown timer started after first contact.
-This way 'easy' will be more easy --- a frequently requested feature.
 
-
 DIFFICULTY LEVELS
 =================
 
-There are currently four difficulty levels: 'easy', 'medium', 
+There are currently five difficulty levels: 'novice', 'easy', 'medium', 
 'hard' and 'experimental'.  The 'hard' level is no-holds-barred, 
 while 'medium' has a number of handicaps.  In 'easy', the AI 
 also does random stupid things through the ai_fuzzy function. The
 'experimental' level is only for coding - you can gate new code
 with the H_EXPERIMENTAL handicap and test 'experimental' level
-AIs against 'hard' level AIs.
+AIs against 'hard' level AIs. In 'novice' the AI researches slower
+than normal players.
 
 Other handicaps used are:
   H_RATES, can't set its rates beyond government limits
@@ -304,10 +260,7 @@
 * AI doesn't know how to make trade routes or when.  It should try to 
 build trade routes for its best cities (most building bonuses and 
 least corruption) by moving caravans there and changing homecity.
-* Ferryboats crossing at sea might lead to unwanted behavior.
 * Emergencies in two cities at once aren't handled properly.
-* AI sometimes will get locked into a zero science rate and stay 
-there.
 * Explorers will not use ferryboats to get to new lands to explore.
 * AI sometimes believes that wasting a horde of weak military units to
 kill one enemy is profitable (PR#1340)
@@ -319,11 +272,6 @@
 * Teach the AI to coordinate the units in an attack (ok, this one is a bit
 big...)
 
-
-THINGS PEOPLE ARE WORKING ON (for latest info ask on AI list)
-===============================================================
-
-* teach AI to do diplomacy (see Diplomacy section) [Per]
 
 
 IDEA SPACE

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6975) Update of TODO and README.AI, Per I. Mathisen <=