Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] More agent code
Home

[Freeciv-Dev] More agent code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] More agent code
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Mon, 24 Sep 2001 07:38:56 -0700 (PDT)

Raimar

Can you please write up the 3 functions below in mathematical terms please.
Similar to how you explained
try_to_find_primary earlier. I may want you to illustrate it with an example
city, similar to the way I
approached apply_result_on_server.
I want a better explanation of 3) calc_fitness in particular. I REALLY
do not like the way you coded try_to_find_primary. My problem lies in your
description below which
I find
a.) circular logic
b.) unnecessary

These are the food and shield upkeeps and the corruption. Since these values
depend on the actual
production (which is unknown at this time) we have to estimate these based on
the current differnce 
between production and surplus.

ms - minimal surplus
mp - minimal production
u  - upkeep or other factors which decrease the production, depends on the base

production
s  - surplus
p  - actual production

s = p - u(p)

-> mp = ms + u(mp) 

Problem: we don't know mp yet
This is no real problem because we will just do a full calculation of
the city (in fill_out_result) and test afterwards if we got the
required surplus.

Then WHY THE HELL are you calculating mp = ms + u(mp) if it is unnecessary.
I'm either misundertanding what you have written above  or you have made a
boneheaded mistake. Will send 
you either code patches or tell you the functions below are as good as they're
gonna get.

test_extra_trade
 maximize_trade
 calc_fitness
 
 For example the goto agent will have to handle all unit types (air units with
refilling,
 trireme,...) and the settler management need a GUI interface.
 
 I'm volunteering to try extending the goto agent. You're on your own with the
GUI's. Freeciv
 just supports far too many fricking guis. I suggest a gui cull. Do you have
any ideas about 
 airplanes? I'm inclined to rulechanges to make aircraft almost identical to
ground units as far as the AI is 
 concerned. Fortunately the freeciv-dev lists has had a lot of email on how to
handle tri-remes.
 
 
 In the long term the server should contain no AI code. There are two
 large problems with this:
  - the client side ai code has to be at least as good as the server ai
  code
  - there has to be a mechanism on the server side which
  spawns/activates a helper (gui-less) client

The client side ai code can easily be far better than the server AI code. In
fact with the current
duplication of code it would be easy enough to have the client AI play the
server AI! Once the client
AI can successfully beat the server AI no more need for it.

I thought there was already a gui-less client. Isn't it gui-stub? Obviously
there is more required. 
Please say what is missing from gui-stub that you need.  


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.com


[Prev in Thread] Current Thread [Next in Thread]