Grand Prix AI League Topic

Yeah I always lose to him and idk what to do

1 Like

I thought it was you
Screenshot 2025-06-05 110704
i click this
and


he is my opponent but i could be wrong

2 Likes

sorry foe all of the questions, I don’t really understand the arena. But why does this not work???

item = hero.findNearestItem()
if len(item) > 0:
if item.y > hero.y:
hero.moveUp(1)
elif item.y < hero.y:
hero.moveDown(1)
elif hero.y == item.y:
if item.x > hero.x:
hero.moveRight(1)
if item.x < hero.x:
hero.moveLeft(1)

1 Like

What does it do? Does the code just glitch out?

2 Likes

no it just skips past the line and does nothing. I want it to collect the items.

1 Like

I haven’t submitted my code tho

2 Likes

Idk then cause starrydreamer is ur user right?

1 Like

Yes but I haven’t submitted

1 Like

Are you calling the function in a while loop?

1 Like

hero.findNearestItem returns the nearest item, not a array.
Hero.findItems returns a array of every item while hero.findNearestItem returns the nearest item

1 Like

It’s a bug with the if len(item)>0 part. Since it returns a single item, it’s not a array, hence len won’t work

1 Like

Yeah u got me im Chiron lol

1 Like

Lets gooooooooooooooooooo

2 Likes

Imma do this tournament later I purposely dropped my code so

1 Like

Is it just me or does it rank you super slowly?

3 Likes

Mine does to it is really annoying when I’m trying to see if my code is good

2 Likes


I waited five minutes

2 Likes


:skull::skull::skull:

2 Likes

XD. The servers are prob just using all their recources to run the final sims for King’s Gambit.

3 Likes


:scream: :scream: :scream:

3 Likes