Réalisées par des traducteurs professionnels, des entreprises, des pages web ou traductions disponibles gratuitement.
i have multiple accounts.
i have multiple accounts.
Dernière mise à jour : 2018-02-13
Fréquence d'utilisation : 1
Qualité :
then, go through every element in the queue, including elements added to the end over the course of the algorithm, and to each element, do the following:# create a list of the four adjacent cells, with a counter variable of the current element's counter variable + 1 (in our example, the four cells are ((2,8,1),(3,7,1),(4,8,1),(3,9,1)))# check all cells in each list for the following two conditions:## if the cell is a wall, remove it from the list## if there is an element in the main list with the same coordinate and an equal or lower counter, remove it from the list# add all remaining cells in the list to the end of the main list# go to the next item in the listthus, after turn 1, the list of elements is this: ((3,8,0),(2,8,1),(4,8,1))* after 2 turns: ((3,8,0),(2,8,1),(4,8,1),(1,8,2),(4,7,2))* after 3 turns: (...(1,7,3),(4,6,3),(5,7,3))* after 4 turns: (...(1,6,4),(3,6,4),(6,7,4))* after 5 turns: (...(1,5,5),(3,5,5),(6,6,5),(6,8,5))* after 6 turns: (...(1,4,6),(2,5,6),(3,4,6),(6,5,6),(7,8,6))* after 7 turns: ((1,3,7)) - problem solved, end this stage of the algorithm - note that if you have multiple units chasing the same target (as in many games - the finish to start approach of the algorithm is intended to make this easier), you can continue until the entire map is taken up, all units are reached or a set counter limit is reachednow, map the counters onto the map, getting this:now, start at s (7) and go to the nearby cell with the lowest number (unchecked cells cannot be moved to).
then, go through every element in the queue, including elements added to the end over the course of the algorithm, and to each element, do the following:# create a list of the four adjacent cells, with a counter variable of the current element's counter variable + 1 (in our example, the four cells are ((2,8,1),(3,7,1),(4,8,1),(3,9,1)))# check all cells in each list for the following two conditions:## if the cell is a wall, remove it from the list## if there is an element in the main list with the same coordinate and an equal or higher counter, remove it from the list# add all remaining cells in the list to the end of the main list# go to the next item in the listthus, after turn 1, the list of elements is this: ((3,8,0),(2,8,1),(4,8,1))* after 2 turns: ((3,8,0),(2,8,1),(4,8,1),(1,8,2),(4,7,2))* after 3 turns: (...(1,7,3),(4,6,3),(5,7,3))* after 4 turns: (...(1,6,4),(3,6,4),(6,7,4))* after 5 turns: (...(1,5,5),(3,5,5),(6,6,5),(6,8,5))* after 6 turns: (...(1,4,6),(2,5,6),(3,4,6),(6,5,6),(7,8,6))* after 7 turns: ((1,3,7)) – problem solved, end this stage of the algorithm – note that if you have multiple units chasing the same target (as in many games – the finish to start approach of the algorithm is intended to make this easier), you can continue until the entire map is taken up, all units are reached or a set counter limit is reachednow, map the counters onto the map, getting this:now, start at s (7) and go to the nearby cell with the lowest number (unchecked cells cannot be moved to).
Dernière mise à jour : 2016-03-03
Fréquence d'utilisation : 1
Qualité :