Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COThe list contains information on squares (x,y coordinates), refresh means selecting the minimum value from the two options I have. I'm familiar with Dijkstra's algorithm, but this problem is on the Dynamic programming chapter in a problem book. And also, to be honest, Dijkstra would be simpler, but I think it's good practice to not turn the action of solving problems into an algorithm. It helps you not get rooted in a certain mindset.
      singulars
    2. COFirst of all, dynamic programming does not mean you brute-force your way to an answer. 2^n is brute-force, n^2 is a mild breeze. Second of all, D.P. implies that you calculate the local optimal solution, and use it further, until you get a general optimal solution. So I would have to pass through all the squares, so you literally can't get a solution (using DP) more efficient than O(n^2). And if I would use graphs I could just make a graph in which the adjacency of a node with another one means you can move to that square, and I could just BF from start to finish and output the cost.
      singulars
    3. COYou're thinking about this problem as thought it were an abstract graph problem, and not your specific chess problem, and as a chess player, I can guarantee you that if your euclidian distance between your current and target spaces is greater than some constant, than your shortest path does not include squares which are behind you.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload