Question: I am trying to find a hash function which could provide some outputs that have their values well distributed across certain range of values. And the input will be IP addresses.

We are storing IP address as a key into HBase, my understanding is that the rowkey is used in hbase to distribute each row into different region server. If we could distribute the IP addresses well, then the read/write performance should get some level of improvement.

Answer: 
Create a `RobotModel` that contains a `Collection<Robot>` and defines their interaction. Iterate the model in the `doInBackground()` implementation of a [`SwingWorker`](https://docs.oracle.com/javase/tutorial/uiswing/concurrency/worker.html). Invoke `publish()` as meaningful events arise, and `process()` updates to the `RobotWorld` view by querying the model. As discussed [here](https://stackoverflow.com/a/3072979/230513), there should be no drawing in the model and no interaction logic in the view. A single worker should suffice for a moderately complex model, but you can synchronize multiple workers as shown [here](https://stackoverflow.com/a/11372932/230513).
> 
> This robot should be controlled by a thread of it's own.
> 
> 
> 

Why?

IMO, the most important way to describe any thread is to say what it *waits* for. In an internet server, an *accept thread* waits for incoming connections from new clients, and a *client thread* waits for additional commands from a single client. In a program that performs massive parallel computations, a *worker thread* waits for tasks to be performed. In a GUI program, the *event dispatch thread* waits for keyboard and mouse events. Etc., etc.

What will your robot thread wait for?

If it waits for time to pass (i.e., if it calls Thread.sleep()), then your GUI framework probably already has a *timer thread* that does that, and you might want to consider using it. (In Swing, you would use the `javax.swing.Timer` class to submit new timed tasks.)