Remember that a key point of this project is to get a sense of how to design, implement and debug programs that behave somewhat unpredictably because they interact with complex environments that are not precisely specified at programming time. Here is some common sense advice to get started.
Don't just sit down at the computer and start typing. Work your ideas out on scratch paper, with diagrams and formulas. Only implement when you feel you understand what you want to do.
Know how you are going to test your program. Test formulas with boundary cases yourself to make sure they agree with what you want in easy cases. Set integers to zero and one to look for off-by-one errors. Make sure geometric algorithms do the right thing when agents start facing each other, or heading in opposite directions.
Think of diagnostic information you can use to make testing easy, and make sure your program calculates and displays that information correctly. Be just as careful writing test code as writing the algorithms themselves. Nothing is worse than spending hours looking for a bug in an algorithm and finally finding that the algorithm was right all along but the diagnostic printouts weren't doing what you thought they were.
Set the colors of agents with different behavior to be different on the screen so you can see which agent is which. Use the XML attributes r, g, and b.
Edit the world's time parameter so that things step slowly enough for you to see moments where decisions are made.
Use debug mode to watch for particular time steps (which will be displayed on the screen) and use the logfile feature to check the exact parameters for your agents at that time (by searching in the logfile for the string step="N if you are interested in time N).
Draw extra information on the screen when your agents are in debug mode to make sure they are behaving the way you expect. Take advantage of the drawing methods in the World class that handle out-of-bounds data correctly:
Remember that drawing occurs immediately after an agent has carried out a step of action and the environment has been updated accordingly. If you want to visualize aspects of the agent's state from the last round of deliberation, use the Agent member lastStatus (which is an object of class DynamicAgentAttributes).
Make a good effort to understand what your program needs to do and what it is doing. But when you are stuck, you are stuck. There is nothing wrong with asking for help.
Saying "help!" or "I am stuck", however, is not asking for help. We will not give away answers. We will not deprive you of the satisfaction and learning of thinking things through for yourself. It's not in your interest either: the exams in the course will consist mostly of questions that test the problem-solving skills you have developed in the course of writing and analyzing project programs.
Formulate a few specific questions whose answers you think will get you through the impasse, and ask them. Work to understand the answers you get, carry out any advice. If you are still stuck, figure out why you still don't have the information that you need and formulate new, specific questions that you think will get you further now.