It is encouraged that you discuss your solutions with each other and consult online sources to better understand the material. However your code must be written entirely by yourself. As a rule, you should never look at or run anyone else's code for the assignment, whether the code was written by someone currently in the class, or someone who took it previously, even at another university.
Reading pseudocode for generic algorithms (like alpha-beta pruning or A* search) is perfectly OK. If you use a source very closely, for example, converting a pseudocode implementation of A* to python, academic integrity demands that you cite the source (in a comment). You will not be penalized for including such a comment; on the contrary, the citation may help us to understand why your implementation is so similar to someone else's, in case they use and cite the same source.