Difference between revisions of "Talk:ReferencePythonAPI"

From The Battle for Wesnoth Wiki
(clened up old discussion)
m (Archived all outdated feature requests into the history)
 
Line 1: Line 1:
== Feature Requests ==
 
  
== chance to kill ==
 
 
Can I get a chance_to_kill(wesnoth.location)? And it would tell me the chance to kill the unit at the given location, using terrain modifiers and everything.. I assume, the C++ AI has something like it available. [[User:Allefant|Allefant]] 22:39, 10 January 2006 (CET)
 
 
:I'll check what the C++ has, and export it. [[User:Ryo|Ryo]] 09:24, 11 January 2006 (CET)
 
 
:Ok, there is a structure/function associated, <code>attack_analysis</code>. Gonna try to export it, but may be a mess :)
 
:[[User:Ryo|Ryo]] 11:29, 15 January 2006 (CET)
 
 
== usage pattern ==
 
 
I'm not sure it would be really useful, since a good AI would probably derive the usage of a unit out of its properties - but maybe there could be a way to query the usage pattern of a unit? Like "scout" or "fighter".. --[[User:Allefant|Allefant]] 22:35, 13 January 2006 (CET)
 
 
== How would you pit two different Python AIs against each other? ==
 
 
Like the subject line says.  Or is this limited to one Python AI at a time? :( --[[User:Irrevenant|Irrevenant]] 09:54, 15 May 2006 (CEST)
 
 
No, you can assign AIs at will, for example:
 
 
<code>
 
wesnoth --multiplayer --scenario=multiplayer_Blitz --controller1=ai --algorithm1=python_ai --parm1=python_script:py/ai1.py --side1=Rebels --controller2=ai --algorithm2=python_ai --parm2=python_script:py/ai2.py --side2=Northerners
 
</code>
 
 
This should play Blitz, with first player using py/ai1.py, and second py/ai2.py. --[[User:Allefant|Allefant]] 21:37, 16 May 2006 (CEST)
 

Latest revision as of 13:53, 30 July 2006

This page was last edited on 30 July 2006, at 13:53.