taltamir
Posts: 1290
Joined: 4/2/2010 Status: offline
|
i think the resolution is for each explorer to "claim" the nearest unexplored system (maybe with some regard to distance from capital)... When the last system is claimed by an explorer, start doubling up (up to a point)... when no more unexplored systems remain, set them to "explore" systems that haven't been visited in a while. to be more technical.. i suggest: 1. create a list of system which have not been fully explored at game creation, sorted by distance from capital. list should allow the association of two exploration ships per system. 1b. if capital is moved, recreate the list. 2. create a separate list of known "special exploration targets" (aka, when you discover something "special")... 2b. consider an "explore special" mission, and a function where the discovery of a special target causes the closest two exploration vessels which are not performing an "explore special", "repair", or "refuel" mission to stop whatever they are doing (say, explore system) and go explore the special. 3. create an if else function to determine exploration vessels orders. a. when an exploration ship is trying to figure out what to do it should check to see if there is an unassigned special target, if there is, go there. (becoming assigned to it). make two ships do that. b. if there are no unassigned special targets, look at the list of systems to explore. if it already has a ship assigned, skip it. if it doesn't has a ship assigned, check the distance from self to target system, and from target system to home planet, add those two up, get this value for the 10 systems closest to the capital which don't have a ship assigned, become assigned to the closest of those 10. c. if all systems have had a ship assigned, go over the list again, double up. d. if all remaining systems to explore have ships doubled up on them (or there are no remaining systems to explore), start "spying" (aka, visiting systems you don't have sight in. e. whenever a planet, moon, astroid, etc is explored, check if there are any unexplored objects in the system, if none exist, mark system as "fully explored" (thus removing it from exploration list). f. check to see an assigned ship is still "assigned" to a system and has not been crippled / interrupted occasionally... either as a timed function, or whenever a ship is looking over a target... that is, when performing step b, any system for which an explorer has been assigned should call a function to check if it is still assigned, if not, clear the assigned ship field, if yes, then move on to next one. I believe that covers all the bases. making for a robust AI that explores systems systematically, effectively, and orders of magnitude faster then currently. And accounts for everything that can go wrong. mmm.. wait, one more thing. account for space monsters / pirates somehow to not send all explorers to their death.
< Message edited by taltamir -- 7/14/2010 12:24:09 PM >
_____________________________
I do not have a superman complex; for I am God, not Superman.
|