Final Assignment
Still not having implemented the ranged bot on the terrain, I now have to implement the mofo with some line of sight. Yes, the word you are looking for is YIKES!!! And I only have myself to blame. Jotwani was happy with a satellite which told you everything there was to tell. I, like the stupid dork that I am, had to butt in and suggest this shit. Needless to say, it was an offer he couldn't refuse...just as long as "You should be enjoying what you are doing...that is all that matters". Sheesh! I now need a PC with network almost 24/7, and resources are becoming less accesible now. The only bright side is that I am to submit the report by the morning of 5th May instead of the 1st. Onto more technical issues...
A refresher
If bot's range is just 1 then it is equivalent to the FirstAgent and hence it will do normal brute force search, without a care for the shortest path (will work on this if I have the time. Which means I won't). If on the other hand, its range is more than it will find target cell within range of vision using heuristic from Amit's page, and find shortest path to it. Repeat this cycle till target is reached.
The job now
First and foremost is to find out what the bot can and cannot see. I'll try to be as least sophisticated as possible and hence I'll be taking cell-sized elevations/obstacles. Basically, I'll draw a line tangential to an obstacle. If the line covers more than half the area of the square then the bot's pretty much blind to it. It's not as easy as it sounds, not for me, not now (I hate thinking algorithms under deadlines).
For the bot, I'll keep another boolean visible variable to perform AND operation with. Default cost of unknown cell will be well....default i.e. unpassable. If I take elevation into account then I'd have more problems. More on bot movement algos later. First I gotta implement the mechanics of vision. And also think of a better algorithm for the vanilla ranged hopper so that it utilizes already explored terrain, and stops getting stuck.


0 Comments:
Post a Comment
<< Home