Market Agent

MarketAgent is a tool I built for fun to work in the context of playing the MMORPG EvE Online.

It opens a socket on localhost to which EvE's in-game browser can connect, so the user can play the game while using the tool without interruption.

In EvE, one of the possible money-making activities is commodity arbitrage between different solar systems. Since EvE exposes both it's market data and the cyclical graph which makes up it's star systems with their associated "warp" connections, it was possible to analyze the data to find highly profitable trade routes.

Doing so involved considering many factors, including available investment capital and cargo space, but also other considerations like preference for avoiding low-security (dangerous) sectors and the max units that a station would purchase of your cargo.

More interesting was the consideration of the profit/time factor - which could be more easily measured as profit/jump (a jump being a warp between systems). So while a cargo might offer an enormous delta in price between two stations, if they are far enough apart, the profit/jump is small. The application considered this information by traversing EvE Online's star system connection map (possibly avoiding low-security sectors in favor of a longer, safer route), and calculated this for the user.

Profit/jump was simplified for the user to profit/route (each hauling leg of a trip) or profit/trip (travel to pickup station plus route). MarketAgent was intelligent enough to find for the user a trip involving sets of commodities which could be sold at the next stop in the route, or sold at a later stop in the route - but the trip that it offered the user was the most profitable within the pilot's set limits.

But this all meant transporting cargo from just one station to just one other on each leg of the trip. A greater overall profit could possibly be made by carrying different goods to a "cluster" of systems within easy reach of each other, each buying different goods at high prices. MarketAgent was improved to consider clusters of a user-configurable size.

Since MarketAgent was built for an in-game corporation of players who were using corporate capital to fund purchases, I found it convenient to include a reporting feature to track fund usage and corporation profit (of which the pilot kept a percentage).

Over time, it was not enough to find profitable trips. We wanted to know where certain goods were consistently profitable, how the market was changing, and hopefully find a way to predict or even influence it. I built MarketAgent's market analysis feature to do so offline.