📄 النص الكامل للصفحة
--- SECTION: Python Code for BFS weighted algorithm ---
big_maze,
partial(get_accessible_neighbors_weighted,
horizontal_vertical_weight=horz_vert_w,
diagonal_weight=diag_w),
verbose=False)
print('\nBFS weighted.')
print('\nShortest Path:', solution_bfs_w)
print('Cells on the Shortest Path:', len(solution_bfs_w))
print('Shortest Path Distance:', distance_bfs_w)
print('Number of cell visits:', cell_visits_bfs_w)
--- SECTION: Python Code for A* Search weighted algorithm ---
solution_astar_w, distance_astar_w, cell_visits_astar_w=astar_maze_solver(start_cell,
target_cell,
big_maze,
partial(get_accessible_neighbors_weighted,
horizontal_vertical_weight=horz_vert_w,
diagonal_weight=diag_w),
constant_heuristic,
verbose=False)
print('\nA* Search weighted with constant heuristic.')
print('\nShortest Path:', solution_astar_w)
print('Cells on the Shortest Path:', len(solution_astar_w))
print('Shortest Path Distance:', distance_astar_w)
print('Number of cell visits:', cell_visits_astar_w)
--- SECTION: BFS weighted. ---
BFS weighted.
Shortest Path: [(14, 0), (14, 1), (14, 2), (13, 2), (13, 3), (12, 3), (12,
4), (11, 4), (11, 5), (10, 5), (10, 6), (9, 6), (9, 7), (9, 8), (9, 9), (9,
10), (9, 11), (9, 12), (9, 13), (8, 13), (7, 13), (6, 13), (5, 13), (5,
12), (4, 11), (5, 10)]
Cells on the Shortest Path: 26
Shortest Path Distance: 30
Number of cell visits: 1235
--- SECTION: A* Search weighted with constant heuristic. ---
A* Search weighted with constant heuristic.
Shortest Path: [(14, 0), (13, 0), (12, 0), (11, 0), (10, 0), (9, 0), (9,
1), (9, 2), (9, 3), (9, 4), (9, 5), (9, 6), (9, 7), (9, 8), (9, 9), (9,
10), (9, 11), (9, 12), (9, 13), (8, 13), (7, 13), (6, 13), (5, 13), (5,
12), (5, 11), (5, 10)]
Cells on the Shortest Path: 26
Shortest Path Distance: 25
Number of cell visits: 1245
وزارة التعليم
Ministry of Education
123
2023 - 1447
--- VISUAL CONTEXT ---
**IMAGE**: Ministry of Education Logo
Description: A logo featuring a stylized green pattern resembling a tree or leaves, with the text 'وزارة التعليم' (Ministry of Education) in Arabic, '123' and 'Ministry of Education' in English, and '2023 - 1447' below it. It is located at the bottom left corner of the page.
Table Structure:
Headers: N/A
Rows:
Key Values: وزارة التعليم, Ministry of Education, 123, 2023, 1447
Context: This logo serves as a publisher or institutional identifier for the page content.