Auto Topic: cols

auto_cols | topic

Coverage Score
1
Mentioned Chunks
40
Mentioned Docs
12

Required Dimensions

definitionpros_cons

Covered Dimensions

definitionpros_cons

Keywords

cols

Relations

SourceTypeTargetW
Auto Topic: colsCO_OCCURSAuto Topic: rows37
Auto Topic: colsCO_OCCURSAuto Topic: def34
Auto Topic: colsCO_OCCURSAuto Topic: self32
Auto Topic: colsCO_OCCURSAuto Topic: row26
Auto Topic: colCO_OCCURSAuto Topic: cols18
Auto Topic: colsCO_OCCURSAuto Topic: perform_move15
Auto Topic: colsCO_OCCURSAuto Topic: get_board12
Auto Topic: colsCO_OCCURSAuto Topic: vertical10
Auto Topic: colsCO_OCCURSAuto Topic: raise9
Auto Topic: colsCO_OCCURSAuto Topic: valueerror9
Auto Topic: colsCO_OCCURSAuto Topic: copy9
Auto Topic: colsCO_OCCURSAuto Topic: tkinter8
Auto Topic: colsCO_OCCURSAuto Topic: int8
Auto Topic: colsCO_OCCURSAuto Topic: import7
Auto Topic: colsCO_OCCURSAuto Topic: len7
Auto Topic: colsCO_OCCURSAuto Topic: padx7
Auto Topic: colsCO_OCCURSAuto Topic: dominoesgame7
Auto Topic: colsCO_OCCURSAuto Topic: master6
Auto Topic: colsCO_OCCURSAuto Topic: is_legal_move6
Auto Topic: colsCO_OCCURSAuto Topic: legal_moves6
Auto Topic: colsCO_OCCURSAuto Topic: imports5
Auto Topic: colsCO_OCCURSAuto Topic: idx5
Auto Topic: colsCO_OCCURSAuto Topic: pack5
Auto Topic: colsCO_OCCURSAuto Topic: scene5
Auto Topic: colsCO_OCCURSAuto Topic: isinstance5
Auto Topic: canvasCO_OCCURSAuto Topic: cols5
Auto Topic: colsCO_OCCURSAuto Topic: square_size4
Auto Topic: colsCO_OCCURSConstraint Satisfaction Problem3
Auto Topic: colsCO_OCCURSDepth-First Search3
Auto Topic: colsCO_OCCURSAuto Topic: is_solved3
Auto Topic: colsCO_OCCURSAuto Topic: menu3
Auto Topic: colsCO_OCCURSAuto Topic: heap3
Auto Topic: colsCO_OCCURSAuto Topic: fill3
Auto Topic: colsCO_OCCURSAuto Topic: new_game3
Alpha-Beta PruningCO_OCCURSAuto Topic: cols3

Evidence Chunks

SourceConfidenceMentionsSnippet
assignments
CIS5210-Assignments/M2/homework2.py
0.679... n self._reconstruct_solution(parents, nxt) queue.append(nxt) return None def _board_to_state(self): state = 0 cols = self._cols for r in range(self._rows): base = r * cols row = self._board[r] for c in range(cols): if row[c]: state |= 1 << (base + c) return state def _build_move_ ...
assignments
CIS5210-Assignments/M4/hw4-optimized.py
0.679d not b[row][col] and not b[row + 1][col] return col + 1 < self.cols and not b[row][col] and not b[row][col + 1] def legal_moves(self, vertical): b = self.board rows = self.rows cols = self.cols if vertical: row_limit = rows - 1 for r in range(row_limit): row1 = b[r] row2 = b[r + ...
assignments
CIS5210-Assignments/M3/homework3.py
0.678... , "right": (0, 1), } def __init__(self, board): self._board = [list(row) for row in board] self.rows = len(self._board) self.cols = len(self._board[0]) if self.rows else 0 key = (self.rows, self.cols) cache = self._CACHE.get(key) if cache is None: size = self.rows * self.cols goa ...
assignments
CIS5210-Assignments/M4/hw4-optimized.py
0.678= ('board', 'rows', 'cols') def __init__(self, board): if board is None: raise ValueError("board cannot be None") if not isinstance(board, list): raise TypeError("board must be a list of rows") self.rows = len(board) self.cols = len(board[0]) if self.rows else 0 for row in board: ...
assignments
CIS5210-Assignments/M4/hw4-optimized.py
0.677... ############## # Section 1: Dominoes Game ############################################################ def create_dominoes_game(rows, cols): if not isinstance(rows, int) or not isinstance(cols, int): raise TypeError("rows and cols must be integers") if rows < 0 or cols < 0: raise ...
assignments
CIS5210-Assignments/M3/homework3.py
0.656... ############################################## def find_path(start, goal, scene): rows = len(scene) if rows == 0: return None cols = len(scene[0]) sr, sc = start gr, gc = goal if sr < 0 or sr >= rows or sc < 0 or sc >= cols: return None if gr < 0 or gr >= rows or gc < 0 or gc >= ...
assignments
CIS5210-Assignments/M3/homework3_tile_puzzle_gui.py
0.656n range(rows): row_tiles = [] for col in range(cols): tile = Tile(self, puzzle_board[row][col]) tile.grid(row=row, column=col, padx=1, pady=1) row_tiles.append(tile) self.tiles.append(row_tiles) self.bind("<Up>", lambda event: self.perform_move("up")) self.bind("<Down>", lambda e ...
assignments
CIS5210-Assignments/M3/homework3_tile_puzzle_gui.py
0.656ePuzzleGUI(tkinter.Frame): def __init__(self, master, rows, cols): tkinter.Frame.__init__(self, master) self.rows = rows self.cols = cols self.puzzle = homework3.create_tile_puzzle(rows, cols) self.board = Board(self, self.puzzle, rows, cols) self.board.pack(side=tkinter.LEFT, pa ...
assignments
CIS5210-Assignments/M4/homework4.py
0.656... ############## # Section 1: Dominoes Game ############################################################ def create_dominoes_game(rows, cols): if not isinstance(rows, int) or not isinstance(cols, int): raise TypeError("rows and cols must be integers") if rows < 0 or cols < 0: raise ...
assignments
CIS5210-Assignments/M4/homework4_dominoes_game_gui.py
0.656... r.update_status() def update_squares(self): game_board = self.game.get_board() for row in range(self.rows): for col in range(self.cols): self.squares[row][col].set_state(game_board[row][col]) class DominoesGUI(tkinter.Frame): def __init__(self, master, rows, cols): tkinter.Frame. ...
assignments
CIS5210-Assignments/M2/homework2.py
0.635iag1 or (row + col) in diag2: return False cols.add(col) diag1.add(row - col) diag2.add(row + col) return True def n_queens_solutions(n): if n < 0: raise ValueError("n must be non-negative.") limit = (1 << n) - 1 board = [0] * n solutions = [] append = solutions.append def dfs(ro ...
assignments
CIS5210-Assignments/M2/homework2.py
0.635mask |= 1 << ((r - 1) * cols + c) if r + 1 < rows: mask |= 1 << ((r + 1) * cols + c) if c > 0: mask |= 1 << (idx - 1) if c + 1 < cols: mask |= 1 << (idx + 1) masks.append(mask) return masks def _reconstruct_solution(self, parents, state): moves = [] while True: prev_state, move_i ...
assignments
CIS5210-Assignments/M4/homework4.py
0.635... "board cannot be None") if not isinstance(board, list): raise TypeError("board must be a list of rows") self.rows = len(board) self.cols = len(board[0]) if self.rows else 0 for row in board: if not isinstance(row, list): raise TypeError("board rows must be lists") if len(row) != ...
assignments
CIS5210-Assignments/M4/hw4-optimized.py
0.635if not row1[c] and not row2[c]: return False else: col_limit = cols - 1 for r in range(rows): row = b[r] for c in range(col_limit): if not row[c] and not row[c + 1]: return False return True def copy(self): return DominoesGame([row[:] for row in self.board]) def successors(self, ...
assignments
CIS5210-Assignments/M2/homework2_gui.py
0.614... name="row") self.__row_entry.grid(row=1, padx=5, sticky=tk.EW) self.__row_entry.insert(0, 3) col_label = tk.Label(parent, text="# of Cols", justify=tk.LEFT) col_label.grid(row=2, padx=5, sticky=tk.W) self.__col_entry = tk.Entry(parent, name="col") self.__col_entry.grid(row=3, pa ...
assignments
CIS5210-Assignments/M3/homework3.py
0.614... ################## # Section 1: Tile Puzzle ############################################################ def create_tile_puzzle(rows, cols): tiles = list(range(1, rows * cols)) + [0] board = [tiles[r * cols:(r + 1) * cols] for r in range(rows)] return TilePuzzle(board) class Tile ...
assignments
CIS5210-Assignments/M3/homework3.py
0.614... q.heappop(heap) if closed[idx]: continue if idx == goal_idx: path = [] cur = idx while cur != -1: r, c = divmod(cur, cols) path.append((r, c)) if cur == start_idx: path.reverse() return path cur = parent[cur] return None closed[idx] = True r, c = divmod(idx, cols) g_cur = g_score ...
assignments
CIS5210-Assignments/M3/homework3_tile_puzzle_gui.py
0.614... ground=color) self.itemconfig(self.text, text=tile) class Board(tkinter.Frame): def __init__(self, master, puzzle, rows, cols): tkinter.Frame.__init__(self, master) self.puzzle = puzzle self.rows = rows self.cols = cols puzzle_board = puzzle.get_board() self.tiles = [] for row in ...