Skip to content

thanks for the vid! but please I need help with something tho #2

@martin-santiago

Description

@martin-santiago

Thanks a lot for this video, it helped me untderstand backtracking, but i have even a greater challenge that I can not resolve and I want to ask you for some advice and help, imagine the same knights tour but at the start of the algorithm, you already know some steps of the knight in the maze that you can not change, you'll always know the position of the first step tho, it would look something like this:
0 | 0 | 0 |0 | 58 | 23 | 0 |35
0 | 0 | 25 |0 | 15 | 0 | 0 | 0
54 | 27 | 4 |0 | 24 | 0 |0 | 0
1 | 0 | 0 | 0 | 0 | 16 |21 | 60
52 | 29| 0 |5 | 0 | 0 |0 | 37
43 | 6 | 0 | 32 | 9 | 0 |17 | 64
0 | 51 | 0 | 41 | 0 | 19 |0 | 11
7 | 42 | 31 | 50 | 39| 0 |0 | 18

where 0's are "unknown steps", you'd have to discover the tour of the knight knowing some steps, at first I tought that using the same algorithm but in the validateMove() function I made sure that if the next step already exist in the maze, return True only if the new position, new_x and new_y lead to the same already existing step, but I ended in an infinite loop, so that's were I'm asking some advice if you have some I would REALLY apreciate it!, anyways thanks for the helpful video, definetly subscribed. PD: sorry for my bad grammar, english is not my native languageD:!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions