/* LINKS2.LOGIC */ /* Used in Lesson 8. */ g( take_a_level, fail_a_level, 10 ). g( take_a_level, top_marks_at_a_level, -10 ). g( fail_a_level, join_dole, 5 ). g( fail_a_level, go_and_work_for_british_leyland, 10 ). g( fail_a_level, take_year_off_and_go_round_world, -10 ). g( join_dole, die_from_hypothermia, 10 ). g( go_and_work_for_british_leyland, taken_over_by_japanese, -10 ). g( go_and_work_for_british_leyland, not_taken_over_by_japanese, 10 ). g( taken_over_by_japanese, make_100_cars_in_your_1st_year, -10 ). g( make_100_cars_in_your_1st_year, make_1000_cars_in_your_2nd_year, -8 ). g( make_1000_cars_in_your_2nd_year, make_10000_cars_in_your_3rd_year, -4 ). g( make_10000_cars_in_your_3rd_year, make_100000_cars_in_your_4th_year, 2 ). g( make_100000_cars_in_your_4th_year, make_1000000_cars_in_your_5th_year, 10 ). g( make_1000000_cars_in_your_5th_year, 'total_collapse_of_ozone_layer (you die)', 10 ). g( make_1000000_cars_in_your_5th_year, 'smog_causes_nuclear_winter (you die)', 10 ). g( make_1000000_cars_in_your_5th_year, 'terminal greenhouse effect (you die)', 10 ). g( make_1000000_cars_in_your_5th_year, 'house_demolished_to_make_way_for_parking_lot', 9 ). g( not_taken_over_by_japanese, 'join_dole (2)', 10 ). g( 'join_dole (2)', 'die_from_hypothermia (2)', 10 ). g( take_year_off_and_go_round_world, massacred_by_namibian_guerillas, 10 ). g( take_year_off_and_go_round_world, massacred_by_serbian_guerillas, 10 ). g( take_year_off_and_go_round_world, 'drown_in_dutch_dike_after_10th_bottle_of_VERBODEN_VRUCHT', 10 ). g( take_year_off_and_go_round_world, shelled_in_ecuador, 10 ). g( take_year_off_and_go_round_world, hike_across_iceland, 5 ). g( hike_across_iceland, succumb_to_terminal_frostbite, 10 ). g( hike_across_iceland, write_book_on_experience_and_retire_on_royalties, -10 ). g( top_marks_at_a_level, get_place_at_oxford, -5 ). g( top_marks_at_a_level, get_place_at_cambridge, 5 ). g( get_place_at_oxford, drown_whilst_punting_on_cherwell, 10 ). g( get_place_at_oxford, become_president_of_union, 20 ). g( get_place_at_oxford, become_computer_scientist, -10 ). g( become_president_of_union, become_mp, 20 ). g( become_president_of_union, become_chartered_accountant, 20 ). g( become_mp, 'your_indecent_exposure_is_exposed_by_the_SUN', 20 ). g( become_mp, become_chancellor, 10 ). g( become_chancellor, its_a_recession, 10 ). g( its_a_recession, stay_in_erm, 10 ). g( its_a_recession, put_up_interest_rates, 10 ). g( its_a_recession, reduce_public_investment, 10 ). g( stay_in_erm, its_a_recession, 10 ). g( put_up_interest_rates, its_a_recession, 10 ). g( reduce_public_investment, its_a_recession, 10 ). g( become_computer_scientist, learn_prolog, -10 ). g( become_computer_scientist, learn_fortran, 10 ). g( learn_prolog, 'your_wildly_successful_book_sells_over_100000_copies!!!', -1000 ). g( learn_fortran, 'join_dole (3)', 10 ). g( become_chartered_accountant, succumb_to_terminal_boredom, 20 ). g( get_place_at_cambridge, drown_whilst_punting_on_cam, 10 ). g( get_place_at_cambridge, audition_for_cambridge_footlights, -5 ). g( audition_for_cambridge_footlights, become_next_clive_james, -5 ). g( audition_for_cambridge_footlights, your_sketch_bombs, 5 ). g( become_next_clive_james, earn_1_million_from_memoirs_and_retire, -10 ). g( become_next_clive_james, disfigured_for_life_during_experimental_baldness_treatment, 10 ). g( become_next_clive_james, drop_below_wogan_in_ratings, 20 ). goes_to( A, B ) :- g( A, B, W ). weight( B, W ) :- g( A, B, W ).