23
Electronic commerce The part of electronic commerce in world economy has greatly increased during the last few years. People all around the world buy more and more products via the internet. Increasing number of large stores, and manufacturers have web sites, where one can buy goods without ever leaving home.

Electronic commerce The part of electronic commerce in world economy has greatly increased during the last few years. People all around the world buy more

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Electronic commerce

The part of electronic commerce in world economy has greatly increased during the last few years. People all around the world buy more and more products via the internet. Increasing number of large stores, and manufacturers have web sites, where one can buy goods without ever leaving home.

Pros• Reduces the need in

middle-men, thus reducing the cost.

• Reduces man power, thus reducing the store running expense.

• Enables access to all sellers at once, creating a truly free market.

Cons• Buyers don’t have

direct access to the product, making it harder to get exactly what they want.

• Eliminates the personal contact between the buyer and the seller.

Electronic commerce

What do you need an electronic agent for?

• Saves time, otherwise wasted on searching for products and negotiating prices.

• Gets the best possible deals.

• Quick reaction to price changes.

• Relieves the client from worrying about everyday purchases.

What do we do?

Our project is to build an autonomous bidding agent able to participate in different auctions, in the “world” of the Trading Agent Competition (TAC), which is a simplified version of the real world of commerce.

What is the TAC game? It is a competition between 8 different agents.

Each agent has 8 clients, and needs to supply travel

packages to every one of them. A travel package

consists of 3 types of goods: Flights, Hotels and

Entertainment that are traded in different auctions.

Each client has preferences about the different goods.

The agent’s score is determined by his ability to

satisfy the clients’ needs at the lowest cost.

How Does TAC Agent Work?

The agent must satisfy his 8 clients, each of whom

would like to visit Tampa during a common 5-day

period. In order to do so, he must supply them flight

tickets to Tampa and back, hotel rooms, and some

entertainment during their stay. The three types of

goods are traded at separate markets with different

rules.

Flights

There is a flight to Tampa ( inflight ) available for

each day between the first and the fourth, and a

flight from Tampa ( outflight ) available for each

day between the second and the fifth. The amount

of tickets is unlimited, and they are available

throughout the game, but their ask prices constantly

increase. If an agent offers a price higher then the

current ask price, his bid will match immediately.

Hotels

The hotel auctions are more complicated. There are 2

hotels, “Tampa Towers” (the better one) and

“Shoreline Shanties” (the cheaper one), each of which

has 16 rooms . A client must have hotels of the same

type for each day during his stay. Furthermore, he is

willing to pay a special bonus to stay at the better

hotel.

Entertainment

There are three major attractions at Tampa: Alligator Wrestling, Museum and Amusement Park. In order to make the client’s stay more pleasant, the agent may supply him with tickets to some of them. There are 8 tickets of each type for each day, and they are traded among the agents themselves, therefore the tickets can be both bought and sold (unlike all the other goods, that can only be bought). At the beginning of the game, the clients specify how much they are willing to payfor the different entertainment types.

So What’s the Problem? First of all, there are obviously not enough goodsavailable on the market to satisfy all the clients (8agents, 64 clients in total). Another difficulty is the fact that once we bought a flight or a hotel, we’re stuck with it, and if we don’t use it the money we paid is wasted. Also, the goods are highly interdependent, which prevents us from dividing the main problem into smaller ones (dealing with every auction separately, for example). Most of these we solved in our algorithm, yet there are several more, that demand special attention.

Main Algorithm

We divide the game into cycles. Each cycle we do

the following:

1 .Get the new information on the game.

2 .Decide what the agent should buy or sell for best

results, according to his current view of the world

and his predictions.

3 .Decide what prices to offer for the wanted goods.

4 .Buy or sell what the agent should according to 2 .

How do we know what to buy? We make a list of goods in such a way, that if all the goods on the list were given to the clients, the profit wouldbe maximal. What we should buy are all the goods on thelist that we don’t own yet. When making the list weconsider the “safety” of clients’ travel packages byassigning them certainty factors. A certainty factorrepresents the probability of successfully acquiring thepackage (flights, hotels and entertainment). For example,the longer the client’s stay is, the more hotel reservationshe needs (one per day), therefore it is less likely that wewill be able to buy them all. By manipulating the certaintyfactor we avoid packages that are “unsafe”.

How do we know what to pay? It is very probable that while we were getting the

information and thinking what to buy, the ask prices have risen. Therefore, we now must decide what is the best price to offer, so that we will get the goods at reasonable price. The price we offer is the last ask price plus “delta”. We calculate delta according to the aggression factor, which depends upon connection speed (the slower it is, the higher the prices rise while we “don’t look”), alternative availability (we shouldn’t be too aggressive if we can buy something else) and time into game (the less time is left, the less options we have).

What about selling? Among the most interesting features of TAC is the

ability to trade entertainment tickets, and we decided to take advantage of it. At the beginning of the game, we buy all the tickets we can, as long as their price is low enough, only to sell them later at higher prices. At the end of the game, we lower our prices to get rid of excess tickets. Thus we use the uncertainty of the situation for our own benefit: the agents “know” what they need only at the second half of the game, and that is when we sell them the tickets. This strategy not only pays for the tickets we keep, but usually even gets us some extra money.

Assorted Problems and SolutionsProblem: Because of the competition

between the agents, it is not always possible to satisfy all the clients’ needs at reasonable prices.

Solution:We try to satisfy most of the clients’ demands, considering the prices of the goods, thus finding an optimal solution both for the client and for the agent.

Problem: There are many random factors in the game (Price changes, auction closing times, other agents’ strategies – we never know whom we will play against).

Solution: Each time a change occurs we find a new optimal solution considering the change. Moreover, we try to find a solution that is not only profitable, but also has high chances of success (i.e. acquiring all the possible goods).

Problem: There is no information available about the other agents’ needs, which makes long term planning more difficult.

Solution: We try to predict future changes in prices based on the information available, and change our buying strategy accordingly.

Problem: The game is run in real time, which limits the decision making time.

Solution: We use algorithms which both yield almost optimal results, and are as quick as possible.

Agent Improvements• The communication was enhanced using

pipeline mechanism: sending more then one request at a time, and receiving several replies.

• Added hotel price prediction from statistics acquired from previous games.

• Introduced time-saving features – shorter allocation when time presses, receiving only hotel auctions data, ignoring all the rest.

Improvements Continued

• Added “intention concealment” feature: making hotel bids only short time before a hotel auction closes.

• Postponed flight ticket purchases for flights with small price increase, in order to gain more information about the auctions.

Plans for the Future

• Introduce robustness check of the allocation.

• Explore the possibility to “unsettle” other agents, by suddenly increasing prices for some auctions.

Results

In the end we reached the semi-finals and got to the 7th

place out of 8 in our group (despite winning 3 of the

14 games played there).

This figure shows the results of our agent during the

competition. It is clearly seen that the agent is unstable,

which makes the robustness checking problem very

relevant.

This figure shows the results of Whitebear – the top

scoring agent.