URL:
<http://gna.org/bugs/?12982>
Summary: Suspected typo bugs in Python AI scripts
Project: Battle for Wesnoth
Submitted by: seahen
Submitted on: Thursday 02/12/2009 at 20:57
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Artificial Intelligence
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.5.9+svn
Operating System: all
_______________________________________________________
Details:
In /usr/share/games/wesnoth/data/ais/bruteforce.py:
def eval_move(self,orig,dest):
enemlocs = wesnoth.get_enemy_destinations_by_unit().keys()
self.stats[0] += 1
I suspect enemlocs should be enemdests, since the latter is referenced
further down and otherwise undefined and enemlocs is not.
In ./sample.py:
def danger(self, unit, location):
"""Try to estimate danger of moving unit to location."""
attackers = []
for enemy, destinations in wesnoth.get_enemy_destinations_by_unit():
for tile in wesnoth.get_adjacent_tiles(unit):
I suspect get_adjacent_tiles(unit) should be get_adjacent_tiles(location)
since we want to estimate the danger the unit would face in the proposed
location, not its current location.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?12982>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs