How would I best go about creating a task which would sort a target list by one of its’ BB variables? I was thinking Linq but wasn’t sure how you would structure in a new task.
Can you please provide some more information like an example of what you mean? Maybe an example pseudo code. Cause I am not really sure what you mean and maybe I misunderstand the goal.
I will provide you the final task shortly after 🙂
Sure thing. The scenario would be that a series of GOs are entered into a List based on some criteria, say a Tag. They would be the opposition. They would have a BB variable of ‘threatLevel’ which I would have conjured up. Yes, you could grab individual variables, but, what is being developed is an RTS AI based where there is primary input is not keyboard related and decision making is in larger data sets.
What I think would be a versatile addition, then, would be addition at least a secondary sort criteria sounding like ” OrderBy, then OrderBy”. Adapted from the Distance sort task, this would Linq sort by other GOs’ BB variables.
So it’s a list of GameObjects where each of those gameobject’s have a blackboard attached and you want to order the list by one of the blackboard variables attached to those gameobject blackboards?
Yeah, it would good to have the option to add additional sort keys. Probably, we could just extend with a customization based upon what the syntax and handling looks like, but basically you’ve got it. I attached a little Excel thing with an explanation of why and where we are going with this. I really think it would be useful for any who are complex data sets in decision making.
Thanks, guy.
Primary Key Secondary Key Tertiary Key
targetList
Contents threatLevel speed position
GO1 65 10 some Vector
GO2 100 0 some other Vector
GO3 90 5 etc.
GO4 20 20 etc.
So, what I would do with this after identifying the targetList contents
would be able to discriminate that while GO2 is the most powerful
perhaps GO4 is the real threat based on some data set. Where I want
to go with this is exploring fuzzy logic at certain game events for higher level
decision making in a command & control hierarchy. I want to have GO’s
as autonomous decision makers as much as is feasible. The end object for prototype
and first demo is the game playing against itself.