1
منتدى علوم الحاسب / ماهي هذه اللغة
« في: مارس 07, 2008, 11:37:13 مساءاً »
السلام عليكم
مطلوب مني برنامج بلغة سي لتصميم لعبة(tictactao- x/o) وجدت هذا النص على النت اريد فقط معرفة اذا كانت هذه مجرد خوارزمية ام هي لغة برمجة معينة واذا بالامكان تحويلها الى السي او ارشادات لعمل ذلك ولكم جزيل الشكر
(role white)
(role black)
(init (cell 1 1 b))
(init (cell 1 2 b))
(init (cell 1 3 b))
(init (cell 2 1 b))
(init (cell 2 2 b))
(init (cell 2 3 b))
(init (cell 3 1 b))
(init (cell 3 2 b))
(init (cell 3 3 b))
(init (control white))
(<= (legal ?w (mark ?x ?y))
(true (cell ?x ?y b))
(true (control ?w)))
(<= (legal white noop)
(true (control black)))
(<= (legal black noop)
(true (control white)))
(<= (next (cell ?m ?n x))
(does white (mark ?m ?n))
(true (cell ?m ?n b)))
(<= (next (cell ?m ?n o))
(does black (mark ?m ?n))
(true (cell ?m ?n b)))
(<= (next (cell ?m ?n ?w))
(true (cell ?m ?n ?w))
(distinct ?w b))
(<= (next (cell ?m ?n b))
(does ?w (mark ?j ?k))
(true (cell ?m ?n b))
(or (distinct ?m ?j) (distinct ?n ?k)))
(<= (next (control white))
(true (control black)))
(<= (next (control black))
(true (control white)))
(<= (row ?m ?x)
(true (cell ?m 1 ?x))
(true (cell ?m 2 ?x))
(true (cell ?m 3 ?x)))
(<= (column ?n ?x)
(true (cell 1 ?n ?x))
(true (cell 2 ?n ?x))
(true (cell 3 ?n ?x)))
(<= (diagonal ?x)
(true (cell 1 1 ?x))
(true (cell 2 2 ?x))
(true (cell 3 3 ?x)))
(<= (diagonal ?x)
(true (cell 1 3 ?x))
(true (cell 2 2 ?x))
(true (cell 3 1 ?x)))
(<= (line ?x)
(row ?m ?x))
(<= (line ?x)
(column ?m ?x))
(<= (line ?x)
(diagonal ?x))
(<= open
(true (cell ?m ?n b)))
(<= (goal white 100)
(line x))
(<= (goal white 50)
(not open)
(not (line x))
(not (line o)))
(<= (goal white 0)
open
(not (line x)))
(<= (goal black 100)
(line o))
(<= (goal black 50)
(not open)
(not (line x))
(not (line o)))
(<= (goal black 0)
open
(not (line o)))
(<= terminal
(line x))
(<= terminal
(line o))
(<= terminal
مطلوب مني برنامج بلغة سي لتصميم لعبة(tictactao- x/o) وجدت هذا النص على النت اريد فقط معرفة اذا كانت هذه مجرد خوارزمية ام هي لغة برمجة معينة واذا بالامكان تحويلها الى السي او ارشادات لعمل ذلك ولكم جزيل الشكر
(role white)
(role black)
(init (cell 1 1 b))
(init (cell 1 2 b))
(init (cell 1 3 b))
(init (cell 2 1 b))
(init (cell 2 2 b))
(init (cell 2 3 b))
(init (cell 3 1 b))
(init (cell 3 2 b))
(init (cell 3 3 b))
(init (control white))
(<= (legal ?w (mark ?x ?y))
(true (cell ?x ?y b))
(true (control ?w)))
(<= (legal white noop)
(true (control black)))
(<= (legal black noop)
(true (control white)))
(<= (next (cell ?m ?n x))
(does white (mark ?m ?n))
(true (cell ?m ?n b)))
(<= (next (cell ?m ?n o))
(does black (mark ?m ?n))
(true (cell ?m ?n b)))
(<= (next (cell ?m ?n ?w))
(true (cell ?m ?n ?w))
(distinct ?w b))
(<= (next (cell ?m ?n b))
(does ?w (mark ?j ?k))
(true (cell ?m ?n b))
(or (distinct ?m ?j) (distinct ?n ?k)))
(<= (next (control white))
(true (control black)))
(<= (next (control black))
(true (control white)))
(<= (row ?m ?x)
(true (cell ?m 1 ?x))
(true (cell ?m 2 ?x))
(true (cell ?m 3 ?x)))
(<= (column ?n ?x)
(true (cell 1 ?n ?x))
(true (cell 2 ?n ?x))
(true (cell 3 ?n ?x)))
(<= (diagonal ?x)
(true (cell 1 1 ?x))
(true (cell 2 2 ?x))
(true (cell 3 3 ?x)))
(<= (diagonal ?x)
(true (cell 1 3 ?x))
(true (cell 2 2 ?x))
(true (cell 3 1 ?x)))
(<= (line ?x)
(row ?m ?x))
(<= (line ?x)
(column ?m ?x))
(<= (line ?x)
(diagonal ?x))
(<= open
(true (cell ?m ?n b)))
(<= (goal white 100)
(line x))
(<= (goal white 50)
(not open)
(not (line x))
(not (line o)))
(<= (goal white 0)
open
(not (line x)))
(<= (goal black 100)
(line o))
(<= (goal black 50)
(not open)
(not (line x))
(not (line o)))
(<= (goal black 0)
open
(not (line o)))
(<= terminal
(line x))
(<= terminal
(line o))
(<= terminal