” BFC5936编程课程 辅导、 写作c/c++,Java程序Classification: PrivateBFC5936 Final assessment taskPathfinding algorithmBackground:Finding solutions to mazes is usually done as a leisurely activity but finding efficientsolutions to extremely intricate and complicated mazes has been a field that has seem manyuses in the real world. Google maps and Uber are among the many applications that weinteract with on a daily basis using such algorithms. Some famous pathfinding algorithmsinclude Dijkstras algorithm and A*. Whilst knowledge of these algorithms may help you tounderstand pathfinding in more detail, you do not need to implement any of thesealgorithms to solve this task.Instructions:There are three mazes for you to solve: easy medium hardEach maze is a grid of Cells that has been coloured either black, yellow, blue or red. Blackcells are the boundaries or walls of the maze, yellow cells are the path you can follow, theblue cell is the starting point of the maze and the red cell/s is the finishing point.Your algorithm will need start at the blue cell (top left hand corner) and move through eachyellow cell (test if the cell colour is yellow) until the red cell/s are found. Each cell you visit,you must leave behind a sign that you have visited the cell by printing the number of steps ittook you to reach that cell from the starting cell (unless the path ends in a dead end, seehard maze description). For example, if it is the fifth cell you have visited, you should print5 in that cell.A solved maze is one where your path to the final red cell from the blue cell is laid out by aseries of numbers that denote your path without any jumps, missed yellow cells or anydeviations from the path (printing into black cells). An example of a solved maze is attachedas a screenshot.A function has been set up and commented for you to complete that should lead to asolution for the easy maze. Once your function can solve the easy maze, think about howyou can tweak it to accommodate the extra complexities of the medium and hard mazes. Analgorithm that solves the hard maze should be able to solve the medium and easy ones too.Each maze is equally weighted meaning each is worth 1/3rd of the spreadsheet mark.Classification: PrivateEasy maze:The yellow path will only go down or to the right. There are no dead ends and only one redcell.Medium maze:The yellow path can go left, down, up, or right. There are no dead ends but multiple redcells. You must print your path to all the Red cells as if each path is considered from thestarting blue cell. This means that any cells that have multiple paths exiting it will have tohave numbers counting equally in each path. A screenshot of a crossroad is attached forclarity.Hard maze:The yellow path can go left, down, up, or right. There are dead ends and multiple red cells.You must print your path to all the red cells as if each path is considered from the startingblue cell (just like the Medium maze). Additionally, your finished maze should not containany numbers in a path that ends in a dead end (no red cell at the end). A screenshot isattached for clarity. Lastly, this maze is not visible but can be referenced by its namedHard.Tips: START WITH A CODE PLANo What is the problem?o How Would you solve a maze like this by hand?o Can you Recreate your manual process in code? Testing the colour of a cells background can be done using the following snippet ofcode:o If range(a1).interior.color = RGB(255, 255, 0) theno RGB stands for Red Green Blue and it is a standard way of reproducingcolourso The colours relevant to this assessment are: Blue RGB(0, 0, 255) Yellow RGB(255, 255, 0) Red RGB(255, 0, 0) Black RGB(0, 0, 0) Each maze range can be referenced by its nameo The easy maze can be referenced by range(Easy)o The medium maze can be referenced by range(Medium)o The hard maze can be referenced by range(Hard)If there are any questions,Classification: Private如有需要,请加QQ:99515681 或邮箱:99515681@qq.com l
“
添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导。