[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[glob2-devel] Re: Worker AI
From: |
Leo Wandersleb |
Subject: |
[glob2-devel] Re: Worker AI |
Date: |
Wed, 22 Oct 2008 00:32:15 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.16 (X11/20080724) |
hi quinn,
1) please don't ask 3 devs independently for review. that is very annoying as
we all got better things to do than to do the work others might have done
before!
2) in the screenshot attached you can see 2 globs bringing unneeded stone so i
guess you're not yet finished.
>//calculate the suitability value for this unit
>int value = 0
> //attributes: weights:
> //=========== ========
> + urgency * 100
> + timeLeft * 1
> + distBuilding * -1
> + closestResourceDist * -2
> + unit->level[SWIM] * -10
> + unit->level[WALK] * -20
> + unit->level[HARVEST] * -15
> + unit->hp * 10
as i don't like magic numbers (slap me if i produce any more of those. i know i
did before) i'd prefere to have it more like
>//calculate the suitability value for this unit
>int value = 0
> //attributes: weights:
> //=========== ========
> /// describes (i have no idea)
> int urgencyWeight=100;
> /// describes the weight of having much walk distance left before
> needing an inn.
> int timeLeftWeight
> ...
>int value = 0
> //attributes: weights:
> //=========== ========
> + urgency *urgencyWeight
> + timeLeft *timeLeftWeight
> + distBuilding *distBuildingWeight
> + closestResourceDist *closestResourceDistWeight
> + unit->level[SWIM] *swimWeight
> + unit->level[WALK] *walkWeight
> + unit->level[HARVEST] *harvestWeight
> + unit->hp *hpWeight
greetings,
leo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [glob2-devel] Re: Worker AI,
Leo Wandersleb <=