Skip to main content

Questions tagged [cs50ai]

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

Filter by
Sorted by
Tagged with
-1 votes
1 answer
21 views

CS50ai project 5 traffic ValueError in main method

I'm getting this error from the main() function which I did not modify at all. I face this issue upon running python3 traffic.py gtsrb. But check50 flags everything as correct and so does style50. I ...
Vaidik Rungta's user avatar
0 votes
0 answers
12 views

Knights Problem from cs50ai puzzle1

I am struggling with puzzle 1. # Puzzle 1 # A says "We are both knaves." # B says nothing. knowledge1 = And( general_knowledge, Implication(AKnave, Not(And(AKnave, BKnave))), ...
skagamer543's user avatar
0 votes
1 answer
39 views

Minesweeper - :( add_knowledge cannot infer safe cells when given new information

I'm implementing Minesweeper AI add_knowledge funcion which I expanded with add_sentence function for recursion in inference. I've written tests to test my add_knowledge function and it seems to be ...
Maciej Zamojski's user avatar
1 vote
1 answer
12 views

submit50 not yielding results CS50AI : no results

Everything was working well on my system and I was able to submit the first exercise on week 0 and get some results back, however on the second exercise, tictactoe, submit50 yields no results(I have ...
melbel's user avatar
  • 21
0 votes
0 answers
84 views

:( np_chunk finds noun phrases that don't contain other noun phrases

check50 keep showing that there is a problem even though when I checked it with all 10 sentences it work. It expected the outcome: {'holmes', 'the home'} but my output shows: {'the armchair in the ...
ATLAS's user avatar
  • 1
0 votes
0 answers
146 views

CS50AI - Parser :( np_chunk finds noun phrases that don't contain other noun phrases

check50 keeps showing that there's a problem with my code ":( np_chunk finds noun phrases that don't contain other noun phrases", but I can't see what I am doing wrong. Please help me check ...
Eva Chen's user avatar
0 votes
0 answers
113 views

CS50 AI - Attention - Mask Token function does not appear to handle all expected inputs properly

hi i'm having trouble with the get_mask_token_index function in attention. My approach is to convert mask token id to mask token create a list of all tokens in the inputs using the tokens() function ...
akinoali88's user avatar
0 votes
1 answer
69 views

Minesweeper AI randomly gets stuck in infinite loop when checking for subsets

I am working on the Minesweeper AI for the CS50A course. My program seems to work perfectly and identifies all known safe squares and mines except for one small issue where sometimes the code gets ...
Watunki's user avatar
0 votes
1 answer
194 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
31 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
232 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
47 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
88 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
197 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
115 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
339 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
801 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
95 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
153 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
235 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
115 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
789 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
49 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
403 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
312 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
326 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
226 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
2k 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
290 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
904 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
5k 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
862 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
168 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
351 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
210 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