Grid Graph give me multiple walkable node. How can I choose only one

I working on my procedural 2D rouge like mobile game. When I scan using grid graph It give me multiple walkable node. How can I choose to use only in red square. Because at first after generate map I want aStar to scan walkable area in map and give a random position in that area to spawn some enemy.

and Is astar can work around 10 - 15 ai on mobile? Any advice on how to make it most performance?

Thanks for help and sorry for my bad English.

Hi

Take a look at this tutorial, it shows you how to do that in several different ways: https://arongranberg.com/astar/docs/wander.html
In your case you probably want Method 2.

10-15 ais shouldn’t be a problem on mobile. Here is a page with general performance tips: https://arongranberg.com/astar/docs/optimization.html

Thank you! I will take a look.

Method 2 Is random on the whole graph. Isn’t that will calculate all whole graph not only on blue node that I want?

I’m not quite sure what you mean?

When I scan it give me multiple walkable node right? You can see in my picture a blue , green , purple node. I just want to use in blue node only to generate random position and make waypoint. Any advice?

Ah. I see.
Then you could use Method 4 or 5 (with 5 being the preferred one).