[Py4j-users] General Question P4J
Status: Beta
Brought to you by:
barthe
From: Bourassa, M. <Mik...@dr...> - 2011-04-14 18:21:15
|
Hi there. I'm Mike Bourassa. I have a question about whether P4J has a functionality I'm seeking. I have been working with Netlogo (http://ccl.northwestern.edu/netlogo/), an agent development environment. While it is a very nice system, I have reached a stage where I would like to do some more exotic agent behaviour. While Netlogo is easy to program in, I need to use more complex algorithms that exist in libraries for Java, Python, etc. Netlogo allows me to write extensions; essentially I write a program, create a .jar, and Netlogo can call the contents of the .jar. In my current set-up, each agent in Netlogo at some point calls the extension .jar. The .jar contains methods that provide decision making for the agents; state data goes in, a decision comes out. The problem is every time I change the decision making algorithm I have to: shut down Netlogo, alter program, create .jar, restart Netlogo. So I thought, what if the extension just holds the state data and returns a decision, while I use a Python program to do the decision making. That is, the .jar extension would hold the state data and using P4J, a Python program would access the data and return a decision which the extension would then pass back to Netlogo. The advantage would be that I could alter the Python program without having to recreate a .jar and shutdown Netlogo every time. So: does that make any sense and could P4J help me achieve my goal? Thanks in advance for any assistance. Mike Bourassa - |