Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 1.51 KB

README.md

File metadata and controls

19 lines (15 loc) · 1.51 KB

AI-Store-Trip

This is a JavaScript program that simulates an AI agent going to the store, buying items, and heading home. Perceptrons are used to help the agent make decisions in the program.

Perceptrons are one of the fundamental components of neural networks. Neural networks are part of machine learning, which is a subfield of artificial intelligence.

This program uses a few perceptrons to allow the AI agent to make deicisions in the program based on certain factors. The agent has to deal with uncertainity, probability, and learning from previous decisions to make future decisions to progress. Some user input is required to successfully complete the program.

While this is not as complex as other AI programs out there, writing this program has helped me understand artificial intelligence and machine learning better. I have placed comments throughout StoreTrip.js to help show what is happening in the program.

How to Run Program

  1. Install latest version of Node.js through your terminal, if needed.
  2. Install either npm i readline or npm i linebyline through your terminal, if needed.
  3. Navigate to the directory that you installed StoreTrip.js.
  4. Type node StoreTrip.js.
  5. While running StoreTrip.js, you will get to the part where you are given three choices in the store. You can choose l for left, r for right, or s to go straight down. The order does not matter. The AI agent will not leave the store until it goes to all three sections of the store at least once.