- Planner is greedy, meaning it searches for any event that passes it's precondition and doesn't affect a currently in use state.
- Cut down sizes of a lot of objects.
- Created new map and scenario for demo.
- Abstract prison, with locked doors, guards, keys etc.
- Two sides of prison, with agents that all go towards same goal, and even help out each other now and then (well once for now...).
- Worked on doors and other objects to make everything easier to edit and add to the map
- OPTIMIZATIONS (took lots of time...)
- Had planner store Default Actions instead of my event class which extends the default action class
- My events contained information extraneous to the planner such as the behavior trees
- Had to refactor a lot of code
- Added an int to Default Action which corresponded to a unique Event.
- Abstracted positions to just be a room number, and doors to be links between two rooms.
- Allowed me not to track position of agents as they moved.
- More importantly, took away need for constantly calling NacCanReach, an expensive Unity NavMeshAgent function
- Changed my extension of the Default State class to use unsigned long bitmaps instead of string->int Dictionaries
- This was the most difficult change of all
- State has to keep track of every object and agents state in the world
- For now state just includes two ulongs, one for the states of objects and agents, and one for the state of the rooms and what other rooms they can access.
- Had to create all this power of 2 offsets, based on 1, the objects "number," and 2, the specific state's location on the bitmap.
- For instance Person 3's "has key" state is mapped to 2^14 (where all they has key states go) * 2^3 (the person's number offset)
- This got to be very complicated for certain states who's state were not binary (for instance, what other rooms a room has access to) and for retrieving and changing specific bits
- Too many bitwise operations
- Huge boost to memory performance
- Changed which agents had the ability to perform which actions to create as few branches in the plan as possible
- As much as possible, give each agent one option at each stage in the plan, so the planning tree does not grow exponentially
- Actually the easiest change, but the biggest effect
- Finally got both sides of map planning in tandem in just 2 seconds!
- Added new trapping a guard event. Uses agents from both sides of map
Summer Research
Sunday, July 7, 2013
BIG Update
It's been an intense two weeks on the project. There's so much stuff I'll have to bullet point it.
Monday, June 24, 2013
Guards
I have also added a guard script, which creates a behavior tree outside of the plan. For now, the guard closes off doors, and prevent another agent from unlocking, opening, or going through that door. This action is considered a dynamic event as it is outside the planner's plan, so it triggers a replan if it affects the current plan's precnoditions.
Locking
I've added a locked state to the doors, as well as a key smart object, and getObject and unlockDoor interactions. This complicates the plans, which demonstrates the systems still work with larger plans, however it has also resulted in some slowdown when planning.
Monday, June 17, 2013
Related Work
citation for PAR
some work of jan allbeck
all the citations from the cga paper
-------------------------------------
Simulating Multiple Character Interactions with Collaborative and Adversarial Goals
The 2012 IEEE Transactions on Visualization and Computer Graphic (TVCG 2012)
http://hubertshum.com/info/publications/tvcg2012/index.htm
@article{shum12simulating,
author={Shum, H.P.H. and Komura, T. and Yamazaki, S.},
journal={IEEE Transactions on Visualization and Computer Graphics},
title={Simulating Multiple Character Interactions with Collaborative and Adversarial Goals},
year={2012},
month={may},
volume={18},
number={5},
pages={741 -752},
doi={10.1109/TVCG.2010.257},
ISSN={1077-2626}, }
Interaction Patches for Multi-Character Animation
ACM Transactions on Graphics (ToG) / Proceedings of the 2008 ACM SIGGRAPH Asia (SIGGRAPH Asia 2008)
http://hubertshum.com/info/publications/siggraphasia2008/index.htm
@article{shum08interaction,
author = {Shum, Hubert P. H. and Komura, Taku and Shiraishi, Masashi and Yamazaki, Shuntaro},
title = {Interaction patches for multi-character animation},
journal = {ACM Trans. Graph.},
volume = {27},
number = {5},
year = {2008},
issn = {0730-0301},
pages = {1--8},
doi = {http://doi.acm.org/10.1145/1409060.1409067},
publisher = {ACM},
address = {New York, NY, USA}, }
Simulating Interactions of Avatars in High Dimensional State Space
http://hubertshum.com/info/publications/i3d2008/index.htm
@inproceedings{shum08simulating,
author = {Shum, Hubert P. H. and Komura, Taku and Yamazaki, Shuntaro},
title = {Simulating interactions of avatars in high dimensional state space},
booktitle = {I3D '08: Proceedings of the 2008 symposium on Interactive 3D graphics and games},
year = {2008},
isbn = {978-1-59593-983-8},
pages = {131--138},
location = {Redwood City, California},
doi = {http://doi.acm.org/10.1145/1342250.1342271},
publisher = {ACM},
address = {New York, NY, USA}, }
Authoring Multi-Actor Behaviors in Crowds with Diverse Personalities
Mubbasir Kapadia, Alexander Shoulson, Funda Durupinar, Norman I. Badler
Modeling, Simulation and Visual Analysis of Large Crowds, Springer-Verlag, 2012 (To appear)
@InCollection{mubbasirChapter,
author = {Mubbasir Kapadia and Alexander Shoulson and Funda Durupinar and Norman Badler},
title = {Authoring {D}iversity in {P}ersonality and {B}ehavior for {M}ulti-{A}ctor {S}imulations},
booktitle = {Modeling, Simulation and Visual Analysis of Large Crowds},
publisher = {Springer-Verlag},
year = {2012 (Book Chapter, To appear)},
}
A Behavior-Authoring Framework for Multiactor Simulations
Mubbasir Kapadia, Shawn Singh, Glenn Reinman and Petros Faloutsos
IEEE Computer Graphics and Applications, Special Issue, 2011.
@ARTICLE{behaviorCGA,
author={Kapadia, M. and Singh, S. and Reinman, G. and Faloutsos, P.},
journal={Computer Graphics and Applications, IEEE},
title={A Behavior-Authoring Framework for Multiactor Simulations},
year={2011},
month={nov.-dec. },
volume={31},
number={6},
pages={45 -55},
keywords={Web extra;behavior authoring framework;behavioral animation;conflicting goals;multiactor interactions;multiactor simulation;multiagent planner;virtual world;authoring systems;behavioural sciences computing;computer animation;interactive systems;multi-agent systems;virtual reality;},
doi={10.1109/MCG.2011.68},
ISSN={0272-1716},}
ADAPT: The Agent Development and Prototyping Testbed
Alexander Shoulson, Nathan Marshak, Mubbasir Kapadia, Norman I. Badler
ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games, March 2013
@inproceedings{Shoulson:2013:AAD:2448196.2448198,
author = {Shoulson, Alexander and Marshak, Nathan and Kapadia, Mubbasir and Badler, Norman I.},
title = {ADAPT: the agent development and prototyping testbed},
booktitle = {Proceedings of the ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games},
series = {I3D '13},
year = {2013},
isbn = {978-1-4503-1956-0},
location = {Orlando, Florida},
pages = {9--18},
numpages = {10},
url = {http://doi.acm.org/10.1145/2448196.2448198},
doi = {10.1145/2448196.2448198},
acmid = {2448198},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {behavior authoring, character animation, crowd simulation, virtual humans},
}
Multi-Actor Planning for Directable Simulations
Mubbasir Kapadia, Shawn Singh, Glenn Reinman and Petros Faloutsos
IEEE Post-Conference Proceedings, Computer Animation and Social Agents, 2011
@inproceedings{behaviorWorkshop,
author = {Kapadia, Mubbasir and Singh, Shawn and Reinman, Glenn and Faloutsos, Petros},
title = {Multi-actor Planning for Directable Simulations},
booktitle = {Proceedings of the 2011 Workshop on Digital Media and Digital Content Management},
series = {DMDCM '11},
year = {2011},
isbn = {978-0-7695-4413-7},
pages = {111--116},
numpages = {6},
url = {http://dx.doi.org/10.1109/DMDCM.2011.40},
doi = {http://dx.doi.org/10.1109/DMDCM.2011.40},
acmid = {2014473},
publisher = {IEEE Computer Society},
address = {Washington, DC, USA},
keywords = {behavior authoring, centralized planning, multi-objective constraint satisfaction},
}
A. Shoulson, F. Garcia, M. Jones, R. Mead, and N. I. Badler. "Parameterizing Behavior Trees." Fourth International Conference on Motion in Games (MIG), 2011.
@incollection {springerlink:10.1007/978-3-642-25090-3_13,
author = {Shoulson, Alexander and Garcia, Francisco and Jones, Matthew and Mead, Robert and Badler, Norman},
affiliation = {Department of Computer and Information Science, University of Pennsylvania, Philadelphia, PA 19104-6389, USA},
title = {Parameterizing Behavior Trees},
booktitle = {Motion in Games},
series = {Lecture Notes in Computer Science},
editor = {Allbeck, Jan and Faloutsos, Petros},
publisher = {Springer Berlin / Heidelberg},
isbn = {978-3-642-25089-7},
keyword = {Computer Science},
pages = {144-155},
volume = {7060},
url = {http://dx.doi.org/10.1007/978-3-642-25090-3_13},
note = {10.1007/978-3-642-25090-3_13},
year = {2011}
}
A. Shoulson and N. I. Badler. "Event-Centric Control for Background Agents." Fourth International Conference on Interactive Digital Storytelling (ICIDS), 2011.
@inproceedings{DBLP:conf/icids/ShoulsonB11,
author = {Alexander Shoulson and
Norman I. Badler},
title = {Event-Centric Control for Background Agents},
booktitle = {ICIDS},
year = {2011},
pages = {193-198},
ee = {http://dx.doi.org/10.1007/978-3-642-25289-1_21},
bibsource = {DBLP, http://dblp.uni-trier.de}
}
A. Shoulson, D. Garcia, and N. I. Badler. "Selecting Agents for Narrative Roles." Fourth Workshop on Intelligent Narrative Technologies (INT4) at the Artificial Intelligence for Interactive Digital Entertainment Conference (AIIDE), 2011.
@paper{AIIDE11WS4089,
author = {Alexander Shoulson and Daniel Garcia and Norman Badler},
title = {Selecting Agents for Narrative Roles},
conference = {Artificial Intelligence for Interactive Digital Entertainment Conference},
year = {2011},
keywords = {Interactive Narrative; Smart Events; Behavioral AI; Agents},
abstract = {We present ongoing work on a system that accommodates player agency in a digital narrative with an external plot. We focus on key events that should occur in that storyline for dramatic effect, but do not explicitly specify the characters that should fill the roles needed for those events. Instead, we define them abstractly, with characteristics that the selected characters should have (including previous events they should have completed for eligibility), and rely on a Director construct to populate those roles from agents in the selection pool that fit those criteria. Agents begin as largely homogeneous, primordial entities that accumulate data and narrative value from the events in which they participate. This creates an environment that differentiates characters by the actions they perform, conferring worth onto characters that become important to the player based on their direct involvement in the plot. The focus, then, is on defining a priori the what of the narrative, while leaving it to the Director construct to decide at runtime exactly who among a distributed pool of agents carries it out.},
url = {http://aaai.org/ocs/index.php/AIIDE/AIIDE11WS/paper/view/4089}
}
some work of jan allbeck
all the citations from the cga paper
-------------------------------------
Simulating Multiple Character Interactions with Collaborative and Adversarial Goals
The 2012 IEEE Transactions on Visualization and Computer Graphic (TVCG 2012)
http://hubertshum.com/info/publications/tvcg2012/index.htm
@article{shum12simulating,
author={Shum, H.P.H. and Komura, T. and Yamazaki, S.},
journal={IEEE Transactions on Visualization and Computer Graphics},
title={Simulating Multiple Character Interactions with Collaborative and Adversarial Goals},
year={2012},
month={may},
volume={18},
number={5},
pages={741 -752},
doi={10.1109/TVCG.2010.257},
ISSN={1077-2626}, }
Interaction Patches for Multi-Character Animation
ACM Transactions on Graphics (ToG) / Proceedings of the 2008 ACM SIGGRAPH Asia (SIGGRAPH Asia 2008)
http://hubertshum.com/info/publications/siggraphasia2008/index.htm
@article{shum08interaction,
author = {Shum, Hubert P. H. and Komura, Taku and Shiraishi, Masashi and Yamazaki, Shuntaro},
title = {Interaction patches for multi-character animation},
journal = {ACM Trans. Graph.},
volume = {27},
number = {5},
year = {2008},
issn = {0730-0301},
pages = {1--8},
doi = {http://doi.acm.org/10.1145/1409060.1409067},
publisher = {ACM},
address = {New York, NY, USA}, }
Simulating Interactions of Avatars in High Dimensional State Space
http://hubertshum.com/info/publications/i3d2008/index.htm
@inproceedings{shum08simulating,
author = {Shum, Hubert P. H. and Komura, Taku and Yamazaki, Shuntaro},
title = {Simulating interactions of avatars in high dimensional state space},
booktitle = {I3D '08: Proceedings of the 2008 symposium on Interactive 3D graphics and games},
year = {2008},
isbn = {978-1-59593-983-8},
pages = {131--138},
location = {Redwood City, California},
doi = {http://doi.acm.org/10.1145/1342250.1342271},
publisher = {ACM},
address = {New York, NY, USA}, }
Authoring Multi-Actor Behaviors in Crowds with Diverse Personalities
Mubbasir Kapadia, Alexander Shoulson, Funda Durupinar, Norman I. Badler
Modeling, Simulation and Visual Analysis of Large Crowds, Springer-Verlag, 2012 (To appear)
@InCollection{mubbasirChapter,
author = {Mubbasir Kapadia and Alexander Shoulson and Funda Durupinar and Norman Badler},
title = {Authoring {D}iversity in {P}ersonality and {B}ehavior for {M}ulti-{A}ctor {S}imulations},
booktitle = {Modeling, Simulation and Visual Analysis of Large Crowds},
publisher = {Springer-Verlag},
year = {2012 (Book Chapter, To appear)},
}
A Behavior-Authoring Framework for Multiactor Simulations
Mubbasir Kapadia, Shawn Singh, Glenn Reinman and Petros Faloutsos
IEEE Computer Graphics and Applications, Special Issue, 2011.
@ARTICLE{behaviorCGA,
author={Kapadia, M. and Singh, S. and Reinman, G. and Faloutsos, P.},
journal={Computer Graphics and Applications, IEEE},
title={A Behavior-Authoring Framework for Multiactor Simulations},
year={2011},
month={nov.-dec. },
volume={31},
number={6},
pages={45 -55},
keywords={Web extra;behavior authoring framework;behavioral animation;conflicting goals;multiactor interactions;multiactor simulation;multiagent planner;virtual world;authoring systems;behavioural sciences computing;computer animation;interactive systems;multi-agent systems;virtual reality;},
doi={10.1109/MCG.2011.68},
ISSN={0272-1716},}
ADAPT: The Agent Development and Prototyping Testbed
Alexander Shoulson, Nathan Marshak, Mubbasir Kapadia, Norman I. Badler
ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games, March 2013
@inproceedings{Shoulson:2013:AAD:2448196.2448198,
author = {Shoulson, Alexander and Marshak, Nathan and Kapadia, Mubbasir and Badler, Norman I.},
title = {ADAPT: the agent development and prototyping testbed},
booktitle = {Proceedings of the ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games},
series = {I3D '13},
year = {2013},
isbn = {978-1-4503-1956-0},
location = {Orlando, Florida},
pages = {9--18},
numpages = {10},
url = {http://doi.acm.org/10.1145/2448196.2448198},
doi = {10.1145/2448196.2448198},
acmid = {2448198},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {behavior authoring, character animation, crowd simulation, virtual humans},
}
Multi-Actor Planning for Directable Simulations
Mubbasir Kapadia, Shawn Singh, Glenn Reinman and Petros Faloutsos
IEEE Post-Conference Proceedings, Computer Animation and Social Agents, 2011
@inproceedings{behaviorWorkshop,
author = {Kapadia, Mubbasir and Singh, Shawn and Reinman, Glenn and Faloutsos, Petros},
title = {Multi-actor Planning for Directable Simulations},
booktitle = {Proceedings of the 2011 Workshop on Digital Media and Digital Content Management},
series = {DMDCM '11},
year = {2011},
isbn = {978-0-7695-4413-7},
pages = {111--116},
numpages = {6},
url = {http://dx.doi.org/10.1109/DMDCM.2011.40},
doi = {http://dx.doi.org/10.1109/DMDCM.2011.40},
acmid = {2014473},
publisher = {IEEE Computer Society},
address = {Washington, DC, USA},
keywords = {behavior authoring, centralized planning, multi-objective constraint satisfaction},
}
A. Shoulson, F. Garcia, M. Jones, R. Mead, and N. I. Badler. "Parameterizing Behavior Trees." Fourth International Conference on Motion in Games (MIG), 2011.
@incollection {springerlink:10.1007/978-3-642-25090-3_13,
author = {Shoulson, Alexander and Garcia, Francisco and Jones, Matthew and Mead, Robert and Badler, Norman},
affiliation = {Department of Computer and Information Science, University of Pennsylvania, Philadelphia, PA 19104-6389, USA},
title = {Parameterizing Behavior Trees},
booktitle = {Motion in Games},
series = {Lecture Notes in Computer Science},
editor = {Allbeck, Jan and Faloutsos, Petros},
publisher = {Springer Berlin / Heidelberg},
isbn = {978-3-642-25089-7},
keyword = {Computer Science},
pages = {144-155},
volume = {7060},
url = {http://dx.doi.org/10.1007/978-3-642-25090-3_13},
note = {10.1007/978-3-642-25090-3_13},
year = {2011}
}
A. Shoulson and N. I. Badler. "Event-Centric Control for Background Agents." Fourth International Conference on Interactive Digital Storytelling (ICIDS), 2011.
@inproceedings{DBLP:conf/icids/ShoulsonB11,
author = {Alexander Shoulson and
Norman I. Badler},
title = {Event-Centric Control for Background Agents},
booktitle = {ICIDS},
year = {2011},
pages = {193-198},
ee = {http://dx.doi.org/10.1007/978-3-642-25289-1_21},
bibsource = {DBLP, http://dblp.uni-trier.de}
}
A. Shoulson, D. Garcia, and N. I. Badler. "Selecting Agents for Narrative Roles." Fourth Workshop on Intelligent Narrative Technologies (INT4) at the Artificial Intelligence for Interactive Digital Entertainment Conference (AIIDE), 2011.
@paper{AIIDE11WS4089,
author = {Alexander Shoulson and Daniel Garcia and Norman Badler},
title = {Selecting Agents for Narrative Roles},
conference = {Artificial Intelligence for Interactive Digital Entertainment Conference},
year = {2011},
keywords = {Interactive Narrative; Smart Events; Behavioral AI; Agents},
abstract = {We present ongoing work on a system that accommodates player agency in a digital narrative with an external plot. We focus on key events that should occur in that storyline for dramatic effect, but do not explicitly specify the characters that should fill the roles needed for those events. Instead, we define them abstractly, with characteristics that the selected characters should have (including previous events they should have completed for eligibility), and rely on a Director construct to populate those roles from agents in the selection pool that fit those criteria. Agents begin as largely homogeneous, primordial entities that accumulate data and narrative value from the events in which they participate. This creates an environment that differentiates characters by the actions they perform, conferring worth onto characters that become important to the player based on their direct involvement in the plot. The focus, then, is on defining a priori the what of the narrative, while leaving it to the Director construct to decide at runtime exactly who among a distributed pool of agents carries it out.},
url = {http://aaai.org/ocs/index.php/AIIDE/AIIDE11WS/paper/view/4089}
}
Reworking of manager
I used to have a function which would call separate behavior trees, each of which would have a callback function to call the next event. This grew more complicated with executing actions in parallel and replanning, so I've switched it to one master behavior tree which controls each smaller interaction (themselves groups of nodes). The new tree is a sequence of non-conflicting parallel sequences of interactions. For replanning, this new tree is cleared, remade and then restarted, all within the behavior event/tree framework.
Parallelism working
I now have a working function which compares the states actions change and groups them together to execute at the same time.
Thursday, June 13, 2013
Parallelism in progress
With doors behaving properly now, I will be able to create a scenario where both characters need to open separate doors in order for the handshake to occur. This scenario will enable testing of a function to run adjacent actions of a plan in parallel, if possible.
Subscribe to:
Posts (Atom)