root/deus/KeySeeker.h

Revision 8, 1.5 kB (checked in by pantley2, 4 years ago)

added old DEUS project to SVN

Line 
1 // KeySeeker.h
2 // interface for KeySeeker class, the main routine for regression planning from
3 // author-defined keyframes
4 // Part of the UIUC SigArt 2003 project DEUS
5 // Written 03/2003 by Steve Hanneke
6 #ifndef __KEYSEEKER_H__
7 #define __KEYSEEKER_H__
8
9 //#include "director.h"
10 #include "RegressionPlanner.h"
11
12 class KeySeeker
13 {
14 public:
15    
16     KeySeeker()
17     {attempts = 0; MAX_ATTEMPTS = 1;TIME_LIMIT = 60;}
18    
19     // Seek
20     //  given the root of the story graph, Seek will try to develop and execute
21     //  each author-defined subplot of events
22     ///~ if things don't work out in a specific amount of time (or maybe depth),
23     ///~ try the alternative author-defined subplots
24     int NewSeek(StoryNode* root);
25     int ContinueSeek(StoryNode* root);
26     int Resatisfy(void);
27     bool NoMoreKeyFrames(void);
28    
29     // public variables
30     int MAX_ATTEMPTS;  // number of times to try to seek a story node before indicating that
31                        // the caller should move on to another node and come back to it
32     int TIME_LIMIT;    // amount of time we have for each call to produce results
33
34 private:
35  
36     // private member functions
37
38     int Achieve(KeyFrameNode* frame);
39
40     void ResetAttempteds(KeyFrameNode* frame);
41
42     int PlanAndExecute(KeyFrameNode* frame);
43
44     void ResetTimer(void) { timer = time(0); }
45    
46     // private member data
47
48     int attempts;
49     unsigned int timer;
50     RegressionPlanner RP;
51 };
52
53 #endif
54
Note: See TracBrowser for help on using the browser.