home *** CD-ROM | disk | FTP | other *** search
- INITIAL:
- if not indemo then
- load library gdemo
- indemo = true
- load anykey
- endif
- load fplace /* load the forms needed */
- bestjob = unknown /* Set goal to unknown */
- e.cfco = "p" /* CF algebra is bayesian */
- e.cfjo = "p"
- e.rigr = "a" /* Try ALL rules for an unknown */
- e.best = 15 /* Use up to 15 fuzzy values per variable */
- e.auto = true
- e.lstr = 75
- ans1 = 0; ans2 = 0; ans3 = 0; ans4 = 0; ans5 = 0; ans6 = 0
- second1 = 0; second2 = 0; second3 = 0; second4 = 0;
- second5 = 0; second6 = 0
- clear
- putform place1; release place1 /* Put up the main header */
- putform place2; getform place2; clear place2; release place2
- ans1 += second1 cf 75
- putform place3; getform place3; clear place3; release place3
- ans2 += second2 cf 75
- putform place4; getform place4; clear place4; release place4
- ans3 += second3 cf 75
- putform place5; getform place5; clear place5; release place5
- ans4 += second4 cf 75
- putform place6; getform place6; clear place6; release place6
- ans5 += second5 cf 75
- putform place7; getform place7; release place7
- ans6 += second6 cf 75
- clear
- at 12,34 ?"Thinking away..."
-
- DO:
- clear
- putform place8
- release place8
- i = 1
-
- /* Display all the values of the fuzzy variable BESTJOB */
- /* by scanning through and printing all values with */
- /* non-zero certainties. */
-
- while cfn(bestjob,i) > 0 do
- at 10+i,21 ?valn(bestjob,i),
- at 10+i,54 ?cfn(bestjob,i) using "ddd",
- i = i + 1
- endwhile
- putform anykey; wait; clear
-
- GOAL: bestjob
-
- RULE: LIKED1
- IF: ans1 = 1
- THEN: bestjob += {"Accounting" cf 20, "Financial Analysis" \
- cf 12, "Data Processing" cf 12}
- NEEDS: ans1
- CHANGES: bestjob
- REASON: If the person liked accounting in college, then they
- are suited for accounting (cf 20), financial analysis
- (cf 12), and data processing (cf 12).
- COMMENT: The person liked accounting in college.
-
- RULE: LIKED2
- IF: ans1 = 2
- THEN: bestjob += {"Marketing Research" cf 18, \
- "Financial Analysis" cf 20}
- NEEDS: ans1
- CHANGES: bestjob
- REASON: If the person liked quantitative methods in college,
- then they are suited for marketing research
- (cf 18) and financial analysis (cf 20).
- COMMENT: The person liked quantitative methods in college.
-
- RULE: LIKED3
- IF: ans1 = 3
- THEN: bestjob += {"Supervision" cf 18,"Personnel" cf 20, \
- "Sales" cf 16, "Customer Support" cf 10}
- NEEDS: ans1
- CHANGES: bestjob
- REASON: If the person liked human relations in college, then
- they are suited for supervision (cf 18), personnel
- (cf 20), sales (cf 16), and customer support (cf 10).
- COMMENT: The person liked human relations in college.
-
- RULE: LIKED4
- IF: ans1 = 4
- THEN: bestjob += {"Accounting" cf 14, "Marketing Research" \
- cf 14, "Financial Analysis" cf 14,"Data Processing" cf 20}
- NEEDS: ans1
- CHANGES: bestjob
- REASON: If the person liked computer science in college, then
- they are suited for data processing (cf 20), accounting
- (cf 14), marketing research (cf 14), and financial
- analysis (cf 14).
- COMMENT: The client liked computer science in college.
-
- RULE: LIKED5
- IF: ans1 = 5
- THEN: bestjob += {"Personnel" cf 18, "Supervision" cf 16, \
- "Sales" cf 16, "Customer Support" cf 16}
- NEEDS: ans1
- CHANGES: bestjob
- REASON: If the person liked communications in college, then
- they are suited for personnel (cf 18), supervision
- (cf 16), sales (cf 16), and customer support (cf 16).
- COMMENT: The person liked communications in college.
-
- RULE: LIKED6
- IF: ans1 = 6
- THEN: bestjob += {"Marketing Research" cf 18, "Supervision" \
- cf 16, "Personnel" cf 18, "Sales" cf 14}
- NEEDS: ans1
- CHANGES: bestjob
- REASON: If the person liked psychology in college, then they
- are suited for marketing research (cf 18), supervision
- (cf 16), personnel (cf 18), and sales (cf 14).
- COMMENT: The person liked psychology in college.
-
- RULE: STRNGTH1
- IF: ans2 = 1
- THEN: bestjob += {"Supervision" cf 18, "Personnel" cf 20, \
- "Sales" cf 18, "Customer Support" cf 16, \
- "Data Processing" cf 14}
- NEEDS: ans2
- CHANGES: bestjob
- REASON: If their greatest strength is working with people,
- then they are suited for supervision (cf 18),
- personnel (cf 20), sales (cf 18), customer support
- (cf 16), and data processing (cf 14).
- COMMENT: Greatest strength is working with people.
-
- RULE: STRNGTH2
- IF: ans2 = 2
- THEN: bestjob += {"Accounting" cf 20, "Marketing Research" \
- cf 20, "Financial Analysis" cf 20, "Data Processing" \
- cf 18}
- NEEDS: ans2
- CHANGES: bestjob
- REASON: If the person's strength is working with data, then
- they are suited for accounting, marketing research,
- and financial analysis with certainty 10, and data
- processing with certainty 9.
- COMMENT: Their strength is working with data.
-
- RULE: STRNGTH3
- IF: ans2 = 3
- THEN: bestjob += {"Marketing Research" cf 18, "Financial Analysis" \
- cf 18}
- NEEDS: ans2
- CHANGES: bestjob
- REASON: If the person's strength is working with ideas, then
- they are suited for marketing reasearch of financial
- analysis (cf 18).
- COMMENT: Their strength is working with ideas.
-
- RULE: STRNGTH4
- IF: ans2 = 4
- THEN: bestjob += {"Customer Support" cf 20, "Marketing Research" \
- cf 16, "Financial Analysis" cf 16, "Personnel" cf 16}
- NEEDS: ans2
- CHANGES: bestjob
- REASON: If the person's strength is solving problems, then
- they are suited for customer support (cf 20),
- marketing research (cf 16), financial analysis (cf 16),
- and personnel (cf 16).
- COMMENT: Their strength is solving problems.
-
- RULE: GRADES1
- IF: ans3 = 1
- THEN: bestjob += {"Personnel" cf 16, "Sales" cf 16}
- NEEDS: ans3
- CHANGES: bestjob
- REASON: If the person's highest grades were in liberal arts
- courses, then they are suited for personnel (cf 16)
- and sales (cf 16).
- COMMENT: Highest grades were in liberal arts.
-
- RULE: GRADES2
- IF: ans3 = 2
- THEN: bestjob += {"Marketing Research" cf 18, \
- "Financial Analysis" cf 18, "Data Processing" cf 16}
- NEEDS: ans3
- CHANGES: bestjob
- REASON: If the person's highest grades were in math and
- statistics, then they are suited for marketing
- research (cf 18), financial analysis (cf 18), and
- data processing (cf 16).
- COMMENT: Highest grades were in math and statistics.
-
- RULE: GRADES3
- IF: ans3 = 3
- THEN: bestjob += {"Data Processing" cf 20, "Accounting" cf 14, \
- "Marketing Research" cf 14, "Financial Analysis" cf 14}
- NEEDS: ans3
- CHANGES: bestjob
- REASON: If the person's highest grades were in computer
- science, then they are suited for data processing
- (cf 20), accounting (cf 14), marketing research (cf 14),
- and financial analysis (cf 14).
- COMMENT: Highest grades were in computer science.
-
- RULE: GRADES4
- IF: ans3 = 4
- THEN: bestjob += {"Accounting" cf 20, "Financial Analysis" \
- cf 18, "Data Processing" cf 16}
- NEEDS: ans3
- CHANGES: bestjob
- REASON: If their highest grades were in accounting, then they
- are suited for accounting (cf 20), financial analysis
- (cf 18), and data processing (cf 16).
- COMMENT: Highest grades were in accounting.
-
- RULE: GRADES5
- IF: ans3 = 5
- THEN: bestjob += {"Marketing Research" cf 20, "Supervision" \
- cf 16, "Personnel" cf 18, "Sales" cf 16, \
- "Customer Support" cf 14}
- NEEDS: ans3
- CHANGES: bestjob
- REASON: If their highest grades were in psychology, then they
- are suited for marketing research (cf 20),
- supervision (cf 16), personnel (cf 18), sales (cf 16),
- and customer support (cf 14).
- COMMENT: Highest grades were in psychology.
-
- RULE: GRADES6
- IF: ans3 = 6
- THEN: bestjob += {"Financial Analysis" cf 16, \
- "Marketing Research" cf 14, "Data Processing" cf 14, \
- "Supervision" cf 16, "Sales" cf 16}
- NEEDS: ans3
- CHANGES: bestjob
- REASON: If their highest grades were in general management,
- then they are suited for financial analysis (cf 16),
- marketing research (cf 14), data processing (cf 14),
- supervision (cf 16), and sales (cf 16).
- COMMENT: Highest grades were in general management.
-
- RULE: SEENOW1
- IF: ans4 = 1
- THEN: bestjob += {"Financial Analysis" cf 20, \
- "Data Processing" cf 14, "Accounting" cf 12}
- NEEDS: ans4
- CHANGES: bestjob
- REASON: If the person prefers solving mathematical problems,
- then they are suited for financial analysis (cf 20),
- data processing (cf 14), and accounting (cf 12).
- COMMENT: They prefer solving complex mathematical problems.
-
- RULE: SEENOW2
- IF: ans4 = 2
- THEN: bestjob += {"Personnel" cf 20, "Sales" cf 20, \
- "Supervision" cf 18, "Customer Support" cf 16}
- NEEDS: ans4
- CHANGES: bestjob
- REASON: If the person prefers working with people, then they
- are suited for personnel (cf 20), sales (cf 20),
- supervision (cf 18), and customer support (cf 16).
- COMMENT: They prefer working with people.
-
- RULE: SEENOW3
- IF: ans4 = 3
- THEN: bestjob += {"Financial Analysis" cf 20, "Accounting" \
- cf 16, "Marketing Research" cf 16}
- NEEDS: ans4
- CHANGES: bestjob
- REASON: If the person prefers working alone on data collection
- and analysis, then they are suited for financial
- analysis (cf 20), accounting (cf 16), and marketing
- research (cf 16).
- COMMENT: They prefer working alone on data collection
- and analysis.
-
- RULE: SEENOW4
- IF: ans4 = 4
- THEN: bestjob += {"Financial Analysis" cf 20, "Accounting" \
- cf 20, "Marketing Research" cf 16}
- NEEDS: ans4
- CHANGES: bestjob
- REASON: If the person prefers doing financial computations,
- then they are suited for financial analysis (cf 20),
- accounting (cf 20), and marketing research (cf 16).
- COMMENT: They prefer doing financial computations.
-
- RULE: SEENOW5
- IF: ans4 = 5
- THEN: bestjob += {"Supervision" cf 20, "Personnel" cf 18, \
- "Sales" cf 18, "Customer Support" cf 16}
- NEEDS: ans4
- CHANGES: bestjob
- REASON: If the person prefers working with groups of people,
- then they are suited for supervision (cf 20),
- personnel (cf 18), sales (cf 18), and customer support
- (cf 16).
- COMMENT: They prefer working with groups of people.
-
- RULE: FUTURE1
- IF: ans5 = 1
- THEN: bestjob += {"Financial Analysis" cf 20, \
- "Data Processing" cf 16}
- NEEDS: ans5
- CHANGES: bestjob
- REASON: If they see themselves in five years solving
- mathematical problems, then they are suited for
- financial analysis (cf 20), and data processing
- (cf 18).
- COMMENT: They see themselves in five years solving
- complex mathematical problems.
-
- RULE: FUTURE2
- IF: ans5 = 2
- THEN: bestjob += {"Financial Analysis" cf 18, "Sales" cf 18, \
- "Customer Support" cf 16}
- NEEDS: ans5
- CHANGES: bestjob
- REASON: If they see themselves in five years making decisions,
- then they are suited for financial analysis (cf 18),
- sales (cf 18), and data processing (cf 16)
- COMMENT: They see themselves in five years making
- decisions.
-
- RULE: FUTURE3
- IF: ans5 = 3
- THEN: bestjob += {"Personnel" cf 20, "Customer Support" \
- cf 20}
- NEEDS: ans5
- CHANGES: bestjob
- REASON: If they see themselves in five years solving people
- problems, then they are suited for personnel (cf 20),
- and customer support (cf 20).
- COMMENT: They see themselves in five years solving people
- problems.
-
- RULE: FUTURE4
- IF: ans5 = 4
- THEN: bestjob += {"Supervision" cf 20, "Personnel" cf 20, \
- "Marketing Research" cf 16}
- NEEDS: ans5
- CHANGES: bestjob
- REASON: If they see themselves in five years working with
- groups of people, then they are suited for supervision
- (cf 20), personnel (cf 20), and marketing research
- (cf 16).
- COMMENT: They see themselves in five years working with
- groups of people.
-
- RULE: FUTURE5
- IF: ans5 = 5
- THEN: bestjob += {"Marketing Research" cf 20, "Supervision" \
- cf 20, "Financial Analysis" cf 18, "Data Processing" \
- cf 16}
- NEEDS: ans5
- CHANGES: bestjob
- REASON: If they see themselves in five years making
- recommendations, then they are suited for marketing
- research (cf 20), supervision (cf 20), financial
- analysis (cf 18), and data processing (cf 16).
- COMMENT: They see themselves in five years making
- recommendations.
-
- RULE: FUTURE6
- IF: ans5 = 6
- THEN: bestjob += {"Financial Analysis" cf 20, \
- "Marketing Research" cf 18}
- NEEDS: ans5
- CHANGES: bestjob
- REASON: If they see themselves in five years working along
- on data collection and analysis, then they are suited
- for financial analysis (cf 20) and marketing research
- (cf 18).
- COMMENT: They see themselves in five years working alone
- on data collection and analysis.
-
- RULE: FUTURE7
- IF: ans5 = 7
- THEN: bestjob += {"Accounting" cf 20, "Financial Analysis" \
- cf 20}
- NEEDS: ans5
- CHANGES: bestjob
- REASON: If they see themselves in five years doing financial
- computations, then they are suited for accounting
- (cf 20), and financial analysis (cf 20).
- COMMENT: The see themselves in five years doing financial
- computations.
-
- RULE: GOALS1
- IF: ans6 = 1
- THEN: bestjob += {"Supervision" cf 20, "Sales" cf 20, \
- "Customer Support" cf 20}
- NEEDS: ans6
- CHANGES: bestjob
- REASON: If the most important goal is career development, then
- they are suited for supervision, sales, and customer
- support (cf 20).
- COMMENT: Most important goal is career development.
-
- RULE: GOALS2
- IF: ans6 = 2
- THEN: bestjob += {"Accounting" cf 20, "Data Processing" \
- cf 20, "Financial Analysis" cf 18, "Marketing Research" \
- cf 16, "Customer Support" cf 16}
- NEEDS: ans6
- CHANGES: bestjob
- REASON: If the main goal in improving skills, then they are
- suited for accounting (cf 20), data processing (cf 20),
- financial analysis (cf 18), marketing research (cf 16),
- and customer support (cf 16).
- COMMENT: Most important goal is improving skills.
-
- RULE: GOALS3
- IF: ans6 = 3
- THEN: bestjob += {"Supervision" cf 18, "Personnel" cf 18, \
- "Sales" cf 18, "Marketing Research" cf 16}
- NEEDS: ans6
- CHANGES: bestjob
- REASON: If the main goal is achievement of personal goals,
- then they are suited for supervision (cf 18),
- personnel (cf 18), sales (cf 18), and marketing research
- (cf 18).
- COMMENT: Main goal is achievement of personal goals.
-
- RULE: GOALS4
- IF: ans6 = 4
- THEN: bestjob += {"Sales" cf 20, "Supervision" cf 18}
- NEEDS: ans6
- CHANGES: bestjob
- REASON: If the main goal is making lots of money, then they
- are suited for sales (cf 20) and supervision (cf 18).
- COMMENT: Main goal is making lots of money.
-
- RULE: GOALS5
- IF: ans6 = 5
- THEN: bestjob += {"Customer Support" cf 18, "Data Processing" \
- cf 16, "Accounting" cf 14}
- NEEDS: ans6
- CHANGES: bestjob
- REASON: If the main goal is working with a congenial group of
- people, then they are suited for customer support
- (cf 18), data processing (cf 16), and accounting (cf 14).
- COMMENT: Main goal is working with a congenial group of
- people.
-
- RULE: GOALS6
- IF: ans6 = 6
- THEN: bestjob += {"Sales" cf 20, "Supervision" cf 18, \
- "Data Processing" cf 18}
- NEEDS: ans6
- CHANGES: bestjob
- REASON: If the main goal is rank or status, then they are
- suited for sales (cf 20), supervision (cf 18), and
- data processing (cf 18).
- COMMENT: Main goal is rank or status.
-
- RULE: GOALS7
- IF: ans6 = 7
- THEN: bestjob += {"Personnel" cf 20, "Supervision" cf 16, \
- "Sales" cf 16, "Customer Support" cf 16, \
- "Data Processing" cf 14}
- NEEDS: ans6
- CHANGES: bestjob
- REASON: If the main goal is helping others, then they are
- suited for personnel (cf 20), supervision (cf 16),
- sales (cf 16), customer support (cf 16), and data
- processing (cf 14).
- COMMENT: Main goal is helping others.
-
- RULE: GOALS8
- IF: ans6 = 8
- THEN: bestjob += {"Marketing Research" cf 18, \
- "Financial Analysis" cf 18, "Data Processing" cf 18}
- NEEDS: ans6
- CHANGES: bestjob
- REASON: If the main goal is solving difficult problems, then
- they are suited for marketing research, financial
- analysis, and data processing (cf 18).
- COMMENT: Main goal is solving difficult problems.
-
- RULE: GOALS9
- IF: ans6 = 9
- THEN: bestjob += {"Personnel" cf 16}
- NEEDS: ans6
- CHANGES: bestjob
- REASON: If the main goal is contributing to society, then they
- are suited for personnel (cf 16).
- COMMENT: Main goal is contributing to society.
-
- RULE: GOALS10
- IF: ans6 = 0
- THEN: bestjob += {"Marketing Research" cf 20, \
- "Data Processing" cf 20, "Accounting" cf 16}
- NEEDS: ans6
- CHANGES: bestjob
- REASON: If the main goal is learning or developing new ideas
- or methods, then they are suited for marketing
- research (cf 20), data processing (cf 20), and
- accounting (cf 16).
- COMMENT: Main goal is learning or developing new ideas
- or methods.
-
- VAR: BESTJOB
- TYPE: pp
- LIMIT: 10
- LABEL: The best position for the applicant
-
- VAR: ANS1
- LABEL: Courses liked best
-
- VAR: ANS2
- LABEL: Greatest strength
-
- VAR: ANS3
- LABEL: Highest grade courses
-
- VAR: ANS4
- LABEL: How I see myself now
-
- VAR: ANS5
- LABEL: See myself in 5 years
-
- VAR: ANS6
- LABEL: Most important goal
-
- END:
-