Questions tagged [cs50ai]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
0 votes
1 answer
7 views

CS50AI Crossword

So I've been working on the CS50Ai Crossword problem for about a day and a half, and after pouring through my entire code several times, I have been unable to fix a bug with my consistent function. ...
Patrick Connolly's user avatar
0 votes
1 answer
12 views

load_data function does not accept/process all of the data types it should be processing

I am working on the CS50AI "Shopping" project and received the following comments from the grader. I have checked the specification carefully but didn't spot any issue. The output seems to ...
David Lau's user avatar
0 votes
1 answer
82 views

CS50 AI minesweeper adding safe moves to the safe_moves set when it is not one

my program keeps adding "not safe mines" to the safe mines set , so it says that it made a safe move but it actually lost the game , this usually happens in mid or late in the game . also ...
Mishary's user avatar
0 votes
0 answers
24 views

CS50AI Tictactoe - Recursion Error

I'm trying to work on the tictactoe assignment from CS50AI. I end up getting an error: "RecursionError: maximum recursion depth exceeded while calling a Python object". I suspect that its an ...
swaminess's user avatar
0 votes
0 answers
56 views

PageRank Project not getting accepted

def iterate_pagerank(corpus, damping_factor): """ Return PageRank values for each page by iteratively updating PageRank values until convergence. Return a dictionary ...
Aashi Goel's user avatar
0 votes
0 answers
99 views

Pygame window not opening

I'm using VS Code on my local machine. When executing runner.py, I get pygame 2.4.0 (SDL 2.26.4, Python 3.11.3) Hello from the pygame community. https://www.pygame.org/contribute.html Nothing in the ...
weary-explanation-91's user avatar
0 votes
1 answer
64 views

CS50 AI -Degrees. Logical problem

I kind of finished the CS50 AI degree problem but I have an issue with the logical part of it. Instead of returning the shortest path, my code has unintentionally been designed to return the whole ...
Josh Eleazar's user avatar
0 votes
0 answers
63 views

cs50ai traffic.py has all requirements already satisfied from requiremnts.txt but keep getting ImportError: libGL.so.1

I have all requirements installed to run traffic.py but every time I run it, I get the following error message when I run python traffic.py gtsrb or python traffic.py gtsrb-small. "ImportError: ...
Mladen Kajasa's user avatar
0 votes
0 answers
224 views

CS50 AI - Tic-Tac-Toe AI not playing optimally

When AI plays as "X", it always wins the game, but when it plays as "O", then, it doesn't play optimally. Can't figure out the problem. I'm attaching the code for MinMax module ...
Sanu Raj's user avatar
2 votes
1 answer
479 views

iterate pagerank issue in cs50ai pagerank project

My PageRank results from iteration come up more than .001 off the initial sampling result but I am not sure where I went wrong. please see code below followed by results. Any help would be greatly ...
Mladen Kajasa's user avatar
0 votes
2 answers
64 views

Unable to install TensorFlow - CS50 AI, Traffic

I am having trouble installing TensorFlow. When I do pip3 install -r requirements.txt it gives me this error: ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: ...
Keshav's user avatar
  • 1
0 votes
1 answer
98 views

CS50 AI lecture 0 search. I tried to implement Maze.py by myself

But I don't know how it's stuck in an infinite loop. I added the explored variable. If the node is examined it shouldn't get added to the frontier. But still, it's stuck in an infinite loop. The same ...
Cosmic's user avatar
  • 1
1 vote
0 answers
186 views

CS50AI: Project 0: Degrees - Getting infinite loop

I am working on Project 0 for the CS50 AI Course and after finishing my function for shortest_path, I am getting an infinite loop(I added a counter that increments with print statements to be able to ...
Ricky's user avatar
  • 11
0 votes
1 answer
98 views

Tokenization problems in CS50ai Project 8 (Questions)

I need help figuring out what's wrong with my code in the last project in CS50ai. I've failed like 5 times now my submissions and I'm so frustrated. lol. Obviously I haven't submitted the same code ...
sulloa's user avatar
  • 1
0 votes
2 answers
485 views

Help with CS50AI Project 1 Knights Puzzle 3

I've been struggling with puzzle 3 of Knights assignment. Any help would be appreciated. Seems like the issue is in depicting the statement B says "A said 'I am a knave'."Below is my code # ...
hrithikbansal's user avatar
0 votes
1 answer
47 views

What is the meaning of this line of python code?

I am working on the first problem set for CS50AI (Degrees project). I believe I understand the intent (or specific workings) of every line of code, except this one: path = [(None, source)] + ...
user1833028's user avatar
0 votes
1 answer
354 views

Iterative PageRank Questions

I have completed the iterative pagerank in the ai50 course and have a doubt. The example in cs50 for the iterative pagerank is different from mine by about 0.0004. If I have to fix this how do I fix ...
Amruth Arunkumar's user avatar
0 votes
1 answer
264 views

Iterative Pagerank Formula

This is the formula cs50 gave us to solve iteratively, And for the second part of the formula we are supposed to repeat until the pagerank doesn't change by more than 0.001. I don't really understand ...
Amruth Arunkumar's user avatar
0 votes
1 answer
313 views

CS50 AI Project 0a CS50 IDE bug

I am a high school student currently enrolled in the CS50 AI online edX course. I downloaded the distribution code for Project 0a, but the CS50 IDE is not able to open the large csv files because it ...
Amruth Arunkumar's user avatar
0 votes
0 answers
194 views

CS50ai - Knights: error invalid syntax for part written by CS50ai (that I should not adapt)

I am having some trouble with exercise 'Knights' (week 1 - 2020 CS50ai). https://cs50.harvard.edu/ai/2020/projects/1/knights/ The goal of this exercise is to write a program to solve logic puzzels. ...
KP.cs50ai's user avatar
1 vote
1 answer
1k views

CS50 AI - Knights - Knowledge 3

having a little trouble with the last part of the knights challenge. When run, it will print nothing for puzzle 3. I have been through the logic countless times now and in my head it seems to work. ...
Chesny's user avatar
  • 27
0 votes
1 answer
271 views

Struggling with logic on cs50 AI search

I completed CS50 intro to computer science a while back and I am starting the AI course now. I watched the lecture, and I understood how the logic worked for the maze and such, but I'm struggling on ...
Joel Banks's user avatar
0 votes
1 answer
718 views

Problem with path reversing in CS50 AI -> Degrees

I have a problem in my code that reverses the path my BFS search algorythm takes. The first project in the CS50 Introduction to artificial intelligence is called degrees and finds a path from one ...
Jonathan Simon's user avatar
3 votes
3 answers
4k views

CS50AI 2020 - Quiz 1 - Entailments

I am not asking for a specific answer, as I assume this would be against the rules of this group, just instructions to the correct approach for the following question: In CS50AI 2020 - Quiz 1, we ...
The GRAPKE's user avatar
0 votes
1 answer
796 views

Using submit50 on VSCode

I'm doing CS50 AI and as a result been using submit50 in VSCode via the Windows Subsystem for Linux. Until I updated my IDE to the April update, submit50 used to ask my GitHub username and password in ...
Suhas Thalanki's user avatar
0 votes
3 answers
152 views

Lecture question from lecture 1 (cs50AI)

In lecture 1(knowledge), Brian gives an example from Harry Potter and concludes that it did not rain that day. My question is that it's never mentioned in the example that rain causes Harry to not ...
Pranjal Kumar's user avatar
1 vote
1 answer
2k views

CS50AI Tic tac toe game with minimax algorithm: I keep receive Invalid move

So my code run, but only the first move, after that I keep getting "Invalid move" message (which was declared by myself) in my result function. I'm not sure what's wrong with my result function, or I ...
earlpanda's user avatar
0 votes
0 answers
324 views

Artificial Intelligence course's 0th lecture. QueueFrontier and StackFrontier produce the same results. What should I do to fix this?

I have joined CS50's Artificial Intelligence with Python online course but encountered a problem in the 0th project I downloaded from their website. It's a maze project and I have to telll the ...
Devansh Gupta's user avatar
0 votes
2 answers
1k views

CS50 AI Problem 1A Invalid Syntax

For CS50AI Problem 1 (Knights), I am really confused as to what is producing this error. Code: from logic import * AKnight = Symbol("A is a Knight") AKnave = Symbol("A is a Knave") BKnight = ...
AK2150's user avatar
  • 11
0 votes
1 answer
200 views

CS50 AI Problem 0B Maximum Recursion Debt in Deepcopy

For CS50 AI Problem 0B, an error occurs when I try to deep copy the board in result(). What can I do? Code: """ Tic Tac Toe Player """ import math import copy X = "X" O = "O" EMPTY = None def ...
AK2150's user avatar
  • 11