⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 birds.pxs

📁 prolog开发工具
💻 PXS
字号:
% BIRDS - a sample bird identification program

top_goal(X) :- bird(X).

order(tubenose) :-
	nostrils(external_tubular),
	live(at_sea),
	bill(hooked).
order(waterfowl) :-
	feet(webbed),
	bill(flat).
order(falconiforms) :-
	eats(meat),
	feet(curved_talons),
	bill(sharp_hooked).
order(passerformes) :-
	feet(one_long_backward_toe).

family(albatross) :-
	order(tubenose),
	size(large),
	wings(long_narrow).
family(swan) :-
	order(waterfowl),
	neck(long),
	color(white),
	flight(ponderous).
family(goose) :-
	order(waterfowl),
	size(plump),
	flight(powerful).
family(duck) :-
	order(waterfowl),
	feed(on_water_surface),
	flight(agile).
family(vulture) :-
	order(falconiforms),
	feed(scavange),
	wings(broad).
family(falcon) :-
	order(falconiforms),
	wings(long_pointed),
	head(large),
	tail(narrow_at_tip).
family(flycatcher) :-
	order(passerformes),
	bill(flat),
	eats(flying_insects).
family(swallow) :-
	order(passerformes),
	wings(long_pointed),
	tail(forked),
	bill(short).

bird(laysan_albatross) :-
	family(albatross),
	color(white).
bird(black_footed_albatross) :-
	family(albatross),
	color(dark).

bird(fulmar) :-
	order(tubenose),
	size(medium),
	flight(flap_glide).

bird(whistling_swan) :-
	family(swan),
	voice(muffled_musical_whistle).
bird(trumpeter_swan) :-
	family(swan),
	voice(loud_trumpeting).

bird(canada_goose) :-
	family(goose),
	head(black),
	cheek(white).
bird(snow_goose) :-
	family(goose),
	color(white).

bird(mallard_male) :-
	family(duck),
	voice(quack),
	head(green).
bird(mallard_female) :-
	family(duck),
	voice(quack),
	color(mottled_brown).
bird(pintail) :-
	family(duck),
	voice(short_whistle).

bird(turkey_vulture) :-
	family(vulture),
	flight_profile(v_shaped).
bird(california_condor) :-
	family(vulture),
	flight_profile(flat).

bird(sparrow_hawk) :-
	family(falcon),
	eats(insects).
bird(peregrine_falcon) :-
	family(falcon),
	eats(birds).

bird(great_crested_flycatcher) :-
	family(flycatcher),
	tail(long_rusty).
bird(ash_throated_flycatcher) :-
	family(flycatcher),
	throat(white).

bird(barn_swallow) :-
	family(swallow),
	tail(forked).
bird(cliff_swallow) :-
	family(swallow),
	tail(square).
bird(purple_martin) :-
	family(swallow),
	color(dark).

nostrils(X) :- ask(nostrils,X).
live(X) :- ask(live,X).
bill(X) :- ask(bill,X).
size(X) :- menuask(size,X,[large,plump,medium,small]).
eats(X) :- ask(eats,X).
feet(X) :- ask(feet,X).
wings(X) :- ask(wings,X).
neck(X) :- ask(neck,X).
color(X) :- ask(color,X).
flight(X) :- menuask(flight,X,[ponderous,powerful,agile,flap_glide,other]).
feed(X) :- ask(feed,X).
head(X) :- ask(head,X).
tail(X) :- menuask(tail,X,[narrow_at_tip,forked,long_rusty,square,other]).
voice(X) :- ask(voice,X).
cheek(X) :- ask(cheek,X).
flight_profile(X) :- menuask(flight_profile,X,[flat,v_shaped,other]).
throat(X) :- ask(throat,X).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -