Giter Site home page Giter Site logo

aima-exercises's Introduction

AIMA Exercises

AIMA exercises is an interactive and collaborative platform for digitalizing the exercises of the book Artificial Intelligence: A Modern Approach by Stuart J. Russell and Peter Norvig.
Exercises for the book Artificial Intelligence: A Modern Approach. The idea is that in the fourth edition of the book, exercises will be online only (they will not appear in the book). This site will showcase the exercises, and will be a platform for students and teachers to add new exercises.
The present version of AIMA-Exercises uses Jekyll 3 and Ruby 2.5. To run the project locally:

  1. Install a full Ruby development environment
  2. Install Jekyll and bundler gems
  3. Installation Guides:
  1. Clone the project locally.
  2. Go to the folder directory where you cloned the project in the terminal.
  3. gem install Jekyll bundler
  4. bundle exec Jekyll serve

The directory structure is as follows:

  • _includes - The include tag allows you to include the content from another file stored in the _includes folder and contains reusable files like staticman_comments.html which is the form used for submitting answers. Sidebar templates, head.html, and breadcrumb.
  • _layouts - They allow you to have the source code for project template in one place so you don’t have to repeat things like your navigation and footer on every page. The layouts folder has default layout, homepage layout, exercise layout, answer submitted layout and others.
  • _site - This is where the generated site is placed (by default) once Jekyll is done transforming it. While contributing, don't change files in the _site directory as Github Pages is compatible with Jekyll and _site folder is updated every time the root directory folders are changed.
  • figures - The figures folder contains figures for all the exercises.
  • js - The JS folder contains the javascript codes for all the features. answer.js, bookmark.js , search.js , commsol.js, forms.js.
  • latex - Latex folder contains latex files for all the exercises.
  • markdown - Markdown folder contains markdown format of all the exercises along with the index.MD files for generating the exercises pages and the answers folder (if an answer is present for that particular exercise). Each exercise has it's own answers folder.
  • public - Public folder contains CSS files and fonts for the project.
  • search - Search folder contains index.MD file for rendering search results.
  • 404.html - 404 page when a person reaches a page which is not present in the directory.
  • Gemfile - A Gemfile is a file we create which is used for describing gem dependencies for Ruby programs. The Gemfile is where you specify which gems you want to use, and lets you specify which versions.
  • Gemfile.lock - The Gemfile.lock file is where Bundler records the exact versions that were installed. This way, when the same library/project is loaded on another machine, running bundle install will look at the Gemfile.lock and install the exact same versions, rather than just using the Gemfile and installing the most recent versions.
  • .jekyll-metadata - Incremental regeneration helps shorten build times by only generating documents and pages that were updated since the previous build. It does this by keeping track of both file modification times and inter-document dependencies in the .jekyll-metadata file.
  • LICENSE.md - License file for aima exercises project. It is released under standard MIT License.
  • README.md - Readme file for the project.
  • _config.yml - Configuration file used by jekyll for building the site.
  • index.html- The front page of the aima exercises project.
  • search_data.json - Search data used by lunr.js for searching through the exercises. It's a script which takes into account all the exercises.
  • staticman.yml - Staticman configuration file for sending automated Pull requests whenever a user submits an answer.

4th Edition of Artificial Intelligence: A Modern Approach will not have exercises. In fact, the exercises will be available online on this platform for students to solve.

Chapter LaTex File Status Markdown
1-Introduction intro-exercises.tex Implemented intro-exercises.md
2-Intelligent-Agents agents-exercises.tex Implemented agents-exercises.md
3-Solving-Problems-By-Searching search-exercises.tex Implemented search-exercises.md
4-Beyond-Classical-Search advanced-search-exercises.tex Implemented advanced-search-exercises.md
5-Adversarial-Search game-playing-exercises.tex Implemented game-playing-exercises.md
6-Constraint-Satisfaction-Problems csp-exercises.tex Implemented csp-exercises.md
7-Logical-Agents knowledge+logic-exercises.tex Implemented knowledge-logic-exercises.md
8-First-Order-Logic fol-exercises.tex Implemented fol-exercises.md
9-Inference-In-First-Order-Logic logical-inference-exercises.tex Implemented logical-inference-exercises.md
10-Classical-Planning planning-exercises.tex Implemented planning-exercises.md
11-Planning-And-Acting-In-The-Real-World advanced-planning-exercises.tex Implemented advanced-planning-exercises.md
12-Knowledge-Representation kr-exercises.tex Implemented kr-exercises.md
13-Quantifying-Uncertainity probability-exercises.tex Implemented probability-exercises.md
14-Probabilistic-Reasoning bayes-nets-exercises.tex Implemented bayes-nets-exercises.md
15-Probabilistic-Reasoning-Over-Time dbn-exercises.tex Implemented dbn-exercises.md
16-Making-Simple-Decisions decision-theory-exercises.tex Implemented decision-theory-exercises.md
17-Making-Complex-Decisions complex-decisions-exercises.tex Implemented complex-decisions-exercises.md
18-Learning-From-Examples concept-learning-exercises.tex Implemented concept-learning-exercises.md
19-Knowledge-In-Learning ilp-exercises.tex Implemented ilp-exercises.md
20-Learning-Probabilistic-Models bayesian-learning-exercises.tex Implemented bayesian-learning-exercises.md
21-Reinforcement-Learning reinforcement-learning-exercises.tex Implemented reinforcement-learning-exercises.md
22-Natural-Language-Processing nlp-communicating-exercises.tex Implemented nlp-communicating-exercises.md
23-Natural-Language-For-Communication nlp-english-exercises.tex Implemented nlp-english-exercises.md
24-Perception perception-exercises.tex Implemented perception-exercises.md
25-Robotics robotics-exercises.tex Implemented robotics-exercises.md
26-Philosophical-Foundations philosophy-exercises.tex Implemented philosophy-exercises.md
27-AI-The-Present-And-Future
Future Exercises future-exercises.tex Unimplemented future-exercises.md

aima-exercises's People

Contributors

anandwana0011 avatar ansh103 avatar antmarakis avatar dragneel7 avatar heisenbuug avatar nalinc avatar norvig avatar nvinayvarma189 avatar sachin10101998 avatar say4n avatar stabgan avatar vincenttam avatar yakout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aima-exercises's Issues

Automated Merging of submitted answers.

Currently, if a user has to submit an answer, he has to visit the Github website and send a new Pull request for the same.
This has two major issues:

  1. Not everyone is familiar with the Github workflow and they may find it tough to understand how to submit their answer.
  2. No specific format/template for submitting answers is in place.

Ideally, a person should be able to send/submit his solution to a particular exercise through the website itself by just filling a form.
This can be done with the help of @staticmanapp or @staticmanaima which creates pull requests on users behalf for sending the submitting answers to GitHub repo and automatically merge them if need be.
After that Github Contents API can be used for rendering the submitted answer as it's already in place.

Conversion from LaTeX to Markdown

First of all, I want to introduce the relevant details:

  1. It can be done using Pandoc

  2. There are some problems associated with Pandoc. It's ignoring few of the important things:-
    a) Bold or Italics
    1

    b) What to do about the headings? The questions numbers can either be replaced by "a new line" indicating question changed or we can have question numbers. Considering this all will go online, there is no need of putting 11.3 or 11.4. Or is there?

  3. Also, there is this extra info about each question coming up? Should the code be modified to ignore [conformant-flip-exercise] in above image altogether or is it required to be there in Markdown?

  4. Then the part regarding images. Should the images be imported from images folder while conversion from LaTeX to Markdown or it should be linked to be used in the aima-exercises page. (to be made later on)

  5. Finally, whether to use Pandoc or not? Is there a need for different code all together for aima-exercises or should we continue tweaking Pandoc settings?

Sample site [GSoC]

Hey, I see I am very late to join the discussion.

I read all the conversations and issues being discussed over here and felt that using markdown. The next challenge was to separate the styling and the contents of the exercise as suggested by @Nalinc. I would also readily agree with him as thsi would make the code more readable and maintainable.

I decided to go with dynamic rendering of markdown to html is our best bet. This will make it easier for the future contributors to add new pages and exercises. On of the reasons of not opting for Jeykll is that we can easily replace the html/css structure with something more modern like react.js

I loved the way @vishakha-lall implemented the comments section. Though I haven't added this to my demo site yet, this feature is super awesome!

And here's the link to the sample site: https://sdabhi23.github.io/aima-exercise-sample/

Are we ready to pay for a domain name and hosting or we will only use the one provided on github pages? Also if we can split the questions from the tex file and save them to the database (which I am very much sure is possible to implement using some simple python script), making the site interactive will become very much easier!!

We can get sufficient amount of free hosting at hasura, by using their free tier.

@norvig any thoughts on the above mentioned points?

Removing communityanswer.md files from all exercises

The presence of communityanswer.md files in all the answers directories make it confusing for the user to submit answers and he may by mistake edit the communityanswer.md file instead of creating a new file for his answer. Therefore, we should delete all such files for now and whenever community answer has to be provided, the communityanswer.md file can be made.

Suggestions needed

My version of aima-website

I saw that many people are giving feedbacks to each other including Peter .
So @norvig and anyone , can you give me suggestions ? If the thing is bad then please tell , I will modify it or try some other design or technique .

Requirements for aima-exercises [gsoc]

Hi!
I am aspiring to contribute to aima-exercises as a GSoC student. I would like to work on designing a format for exercises, where some solutions can be accessed only by professors, or based on criteria set by professors. The aima-gsoc page also talks about creating a community of volunteers to add new exercise questions and solutions, however, that would require dynamic content. Would that be hosted on Github Pages too? As I understand Github Pages works great only for static content.
I would appreciate any suggestions on where to start contributing.
Referring to this issue on aima-gsoc.

Bookmarking Questions feature

There is no feature present currently for bookmarking the exercises. A user should be able to bookmark the exercises that he/she likes and see the list of bookmarked questions in a single place.

GSoC 2019 Onboarding tasks

Share your progress (queries, screenshots, suggestions, hurdles) on GSoC 2019 onboarding tasks here. If you face any difficulties, discuss here instead of opening a new issue. Asking questions does not define your intelligence. It reflects your desire to learn and gives the best evidence of understanding. This is what we are looking for in potential GSoC students.

Changes required for answer submission feature.

Currently, there is no feature for adding user answers for various questions. The user answers can be stored in a separate answers directory alongside the exercise directory and JS can be used for fetching the contents of those answer files using Github API.

A sample format for exercises [GSoC]

@norvig @Nalinc, I have been working on developing a prototype format to display all the exercises of the book on Github Pages.
I have used Angularjs as the client side framework to ensure a single page website. This would mean faster loading and better resource utilization. The template routing of angular components on Github pages, however, is not straightforward, which is why I have worked on using ng-build to modify the base-href.
I have the sample page hosted here.
I have used the markdown files of Introduction chapter to create a sample of the page, I still need to work on the figure links. I have used MathJax (following @Nalinc 's implementation) for the Latex equations and variables.
This is the first prototype that I have created and requires a lot of design work and links. I have spent time realising the best framework to use and the routing method. Please review this and let me know if I am working in the correct direction.
I have a lot of innovative things in mind to ensure that the exercises are interactive for the readers :)

Breadcrumb Feature has been removed from new master

Breadcrumb feature has been removed from the current master but was available in last year's Aima exercise project. This feature is really helpful in navigation and should be added back in the project.

Request to get solution for Exercise 'ex_20' in '9-Inference-In-First-Order-Logic'

Write Prolog clauses that define the predicate sorted(L), which is true if and only if list L is sorted in ascending order.

Write a Prolog definition for the predicate perm(L,M), which is true if and only if L is a permutation of M.

Define sort(L,M) (M is a sorted version of L) using perm and sorted.

Run sort on longer and longer lists until you lose patience. What is the time complexity of your program?

Write a faster sorting algorithm, such as insertion sort or quicksort, in Prolog.

View Answer

Considering Kaggle as host

The team at Kaggle are interested in exploring the possibility that they could host the exercises. There's a quick demo here: https://www.kaggle.com/moconnell/classroom-example-for-peter

Kaggle offers:

  • A nice setup for professors to create groups for their class.
  • Discussion forums.
  • Students would fork a notebook of exercises, and answer them.
  • Students can set visibility to public, class-wide, or private.
  • TAs/graders (or peers) could then review/grade the students answers.
  • Of course, Kaggle has the ability to run programming contests. This could be either within a professor's class, or we could run contests open to anyone.

If we use this we still have a bunch of the same questions not yet answered:

  • Do we create/edit exercises individually, or a notebook at a time?
  • What is the process for curating new suggested exercises?
  • What is the mechanism for a canonical, permanent symbol name for an exercise?
  • Can other hosts besides Kaggle also participate if they want to? If so, what is the process for keeping them in sync?

Is there anything needing work here?

Hello everyone!
I am particularly new to this repository. Wanted to know if there is something I can contribute to in this repository? Also, I have been contributing to aima-python for some time. Thanks

Conversion to Markdown

A few ideas:

  • Hopefully, pandoc can be used to convert to markdown. Perhaps it won't be perfect and there will need to be some hand-editing.
  • I'm worried about math equations. Will MathJax work? Some relevant research here, here, here.
    There's mathTex for rendering images. Or this:
    equation

-Or we could put exercises in Jupyter notebooks (see here).
-Each exercise will need a persistent name/number. We'll need a convention for this.

Sample for Exercise [GSoC]

Project Proposal

This is demo Website for aima-exercises.
Website

Features

  1. Own Markdown Parser
  2. Custom Router.
  3. It supports Mathjax

Problems

  • We need to fix configuration for Mathjax

Todo

  1. Comments Section
  2. Firebase Integeration
  3. Properly Formating Markdown
  4. Adding Offline Support
  5. Layout Design Enhancement

Lots of repetitive code in AIMA-Exercises

Hi @Nalinc I went through the codebase and found that instead of having same repetitive code for Toc, we could go for a single include in the base directory for toc. There are 581 exercises and a total of 61 lines of code per Toc. Therefore if we go for an include file, there would be an easy reduction of 35000 lines of code and will make the codebase easier to understand. I have written a python script to do this job and will send a Pull Request for the same real soon. Let me know your ideas on it so I can proceed with it.

Changes required for Answer submission Feature

Currently, there is no feature for adding user answers for various questions. The user answers can be stored in a separate answers directory alongside the exercise directory and JS can be used for fetching the contents of those answer files using Github API.

Include bibliography file

Some exercises are citing papers and external references. To generate meaningful results, it is important that we include the bibliography file while compiling the LaTex files.

Following is an example exercise from search-exercises.tex.

We gave two simple heuristics for the 8-puzzle: Manhattan distance and misplaced tiles.
Several heuristics in the literature purport to improve on this---see, for example,
\citeA{Nilsson:1971}, \citeA{Mostow+Prieditis:1989}, and \citeA{Hansson+al:1992}.
Test these claims by implementing the heuristics and comparing the performance
of the resulting algorithms.

Based on this, we might also need to decide how to handle bibliographic information and which format to choose while displaying the references.

Inconsistencies found in Jupyter notebook files

I was going through the codebase and found that there are lots of inconsistencies in jupyter notebook files.

  1. All the chapters haven't been indexed.
  2. I don't know what process was used to produce the jupyter files because there are quite a lot of inconsistencies. Chapter 2 has two jupyter files and in one of them, the first exercise has been written as if it was an introduction and the second exercise has been marked as the first exercise. I am adding the screengrab here of the same. The exercise 2.1 in below figure is actually 2.2, 2.2 is actually 2.3 and so on. However, the second file is correctly coded.
    Screenshot (290)
    Same is the case with chapter 11. In the alter files the questions have not been indexed. I figured out that there are figures given in one of the files. But I fail to understand the importance of two different files. Please help me out here.
    I found a few other inconsistencies too. I'd work on resolving these issues and send a pull request soon.

Image files are being fetched from a third-person repository.

The current mechanism is fetching the figure of various exercises from @Nalinc 'directory. This dependency can be removed by making new figures folder inside our own repository and fetching the files from there and thus removing the dependency on account of a third-party person.

Error 404 on opening Chapter 18 Learning from Examples

Error 404 pops up when we try to visit exercises of Chapter 18 in Part V which is named as "Learning from Examples" and the concerned folder is "concept-learning-exercises". The issue arises because there is no index file defined in this folder.

problem with markdown files

There are many conflicts in hosting the github pages with markdown being in the repository. For ex: In bayes-nets-exercises.md there are many errors which result in build failing of github pages. I encountered these errors in the bayes-nets-exercises.md file and I don't know still how many files produce the same errors. I think Jupyter notebooks are way better than markdown files in case of hosting and also with keeping the exercises consitent.
I agree with @norvig as he pointed the disadvantages of notebooks and I'm trying to search for an alternative too. For now I fixed the build errors caused by the markdown files and I will submit a PR soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.