Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

AI Coding Assignment

LISP

Context/overview:  Common Lisp is an object-oriented , functional programming language frequently used for resolving AI problems. In addition, CLISP is an ANSI  Common Lisp implementation.

Resources to consult:  

CLISP-Web site: http://clisp.org/

Sourceforge: CLISP an ANSI Common LISP download: https://sourceforge.net/projects/clisp/

Paul Graham’s Lisp page: http://www.paulgraham.com/lisp.html

Specific questions or items to address:  

Specific questions:

  1. Visit the Sourceforge web site, and download appropriate version of CLISP  for your machine.

  2. Install the CLISP on your machine by following installation instructions provided in the lecture section

Use your favorite editor  (Emacs, notepad, etc)  and edit (write) the code   for the problems provided below.  Once the code is edited, fully debug the code, and then compile it  

To load the code, use the load command:

User (1)☹load “c:\\lisp\\test.lisp” )

To compile the code, one that is fully debugged, use the following command:

User (2)☹compile-file “c:\\lisp\\test.lisp” )

Problem 1: Exponential function

Assume that  both  B(base),  and e (exponent)  are  non-negative integer numbers. Implement the function power  that  calculates the B for the  given E.  Enter your function definition into a text file. Then load it into LISP. Execute the function for the values (power 3 3).   

Take a screenshot of the execution, and  paste it into MS word document.  Provide the appropriate  description of the screenshot.

Additionally, attach and submit your Notepad file into the assignment dropbox.

Problem 2: Calculating Fibonacci Series

The Fibonacci sequence is a sequence of numbers in which each successive number in the sequence is obtained by adding the two previous numbers in the sequence.

If we know that  :

Fib(0)=1

Fib(1)=1

Fib(n) = Fib(n-1) + Fib(n-2) for n>1

Implement the  function Fib that calculates Fibonacci sequence for given n

Enter your function definition into a text file. Then load it into LISP. Execute the function for the value (Fib 5).   

Take a screenshot of the execution, and  paste it into MS Word document.  

Additionally, attach and submit your Notepad file into the assignment dropbox.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question