URL:
<http://gna.org/patch/?5767>
Summary: AI: Improve the way a spy choose what tech to steal
Project: Freeciv
Submitted by: sveinung
Submitted on: Tue 27 Jan 2015 09:49:58 PM UTC
Category: ai
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release:
_______________________________________________________
Details:
I think this may be a good introduction patch for a developer that is new to
the Freeciv AI code.
When a spy decides to steal a tech it will currently choose to steal a random
tech ("Steal Tech") if that is legal. This improves the probability of
success. If stealing a random tech is forbidden it will try to steal the first
tech it finds using "Targeted Steal Tech". In the bundled rulesets "Steal
Tech" is always legal when "Targeted Steal Tech" is.
The choice of what tech to steal is done the function choose_tech_to_steal()
in ai/default/aidiplomat.c. The way it choose target tech should be improved.
A simple way of doing it is to go for the most expensive tech. A more complex
solution would consider how much the AI wants each tech.
If you are extremely confident about the way you select target tech you can
also modify dai_diplomat_city() to go for "Targeted Steal Tech" in some cases
where "Steal Tech" is legal. (That could be done in a follow up patch)
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?5767>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev