Results 1 to 40 of 200

Thread: Contest 2 - PathFinder

Threaded View

  1. #1

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Contest 2 - PathFinder

    Contest 2 - PathFinder


    Language

    VB6 Only, I've been unable to find anyone with enough time to convert the helper project to VB.NET. Sorry about that.


    Deadline

    The dealine for this contest will be Sunday 10th October (Mid-day, BST). This maybe extended pending requests.


    Main Aims

    You have been given a VB6 project which displays a maze and a little player. You the project also contains 3 "Control" functions that have been put in the forums Code, these are Look(), LookAbout() & MovePlayer(). All your code must be in the module called "Controller", in this module we have placed a function named StartGame(), this is the entry point for your code. The only way you can interact with the rest of the program should be though the three "Control" functions. An example of what is expected has been put in the StartGame() function however its by no means any good.

    Using this you must turn StartGame() into a AI function that will guide the player though the maze. The size of the grid is not fixed and the starting position (or end position) is not given.

    The three functions do the following:

    Look()
    This function take a parameter for the direction to look in as a Byte, 1 - North, 2 - East, 3 - South & 4 - West. It then returns a bool to tell you if that direction is clear.

    LookAbout()
    This is the same as Look() in a way but it takes 4 ByRef parameters and these are 4 bools, when the function is called it returns whether the routes are blocked though these parameters.

    MovePlayer()
    This function takes a byte as a parameter the same as Look() and it will attempt to move the player in that direction. The function does not return if the move was allowed though, if the route was blocked then the function runs as if it wasn't. The function does return a bool but the purpose of this is just to tell you if the player has reached the end yet.



    How Is It To Be Marked?

    A marking scheme has been produced and implemented into the project so you can see how well your code is doing. The scoring is based on how many times you call each of the three "Control" functions and each has a different weighting as shown below:
    • Look() - 2 Points
    • LookAbout() - 6 Points
    • MovePlayer() - 3 Points (Independant of whether the player was able to carry out the move)

    As you may see it could be an idea to just run round the maze blind and the points might not be as high but then again you could make lots more moves then needed if you do that.

    We will be running your code with a variety of different maps of sizes ranging upto 300x300 and will be recording the scores. Whoever gets the lowest score overall will be the winner. We have included 3 test maps so you will be able to test your code on them for now.



    What Do I Win?

    The prize for this contest is yet to be announced but at the least it will be another Custom Title Status but I am hoping we will be allowed to make it include Color Tags, like Brads or VisualAds .


    Where Do I Send My Work?

    To submit your work create a new Thread in the Contest Entries Sub-Forum. Please title your Threads "Contest 2, PathFinder - Username", changing Username for your username. Attach a Zip file to the post and include just your Controller module.


    Any Querries?

    If you have any questions then your welcome to send me a PM or any of the other people running the contests.

    Attached Files Attached Files
    Last edited by Electroman; Oct 4th, 2004 at 06:55 PM.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width