What am I doing wrong on Harrowlands!


#1

I submitted my code into harrowlands. I managed to beat the simple AI, but since then I haven’t even won once! I am ranked last. The next highest score is over 1,000 mine…

:sob:

What am I doing wrong?

My Code
enemies = self.findEnemies()
simpleAI = []
for enemy in enemies:
    if enemy.health == self.health and enemy.type == self.type:
        simpleAI.append(enemy)
self.summon("soldier")
self.summon("soldier")
if simpleAI[0]:
    loop:
        if self.isReady("throw"):
            self.throw(simpleAI[0])
        else:
            self.attack(enemy)
        friends = self.findFriends()
        for friend in friends:
            self.command(friend, "attack", simpleAI[0])
else:
    loop:
        enemy = self.findNearest(self.findByType("sand-yak"))
        friends = self.findFriends()
        for friend in friends:
            self.command(friend, "attack", self)
        if self.isReady('throw'):
            self.throw(enemy)
        else:
            self.attack(self)

Arrgh! Identifying enemy types in Harrowland
#2

Is this a joke? This code will only work specifically against the AIs.


#3

Looks like you have achieved your goal of getting Harrowland’s last place then. Congratz.