Peer-to-peer and agent- based computing “Implementation” of Auctions.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

Vas a la agencia de viaje y quieres hacer un viaje a Pick a country Honduras, Colombia or Dominican Republic. Follow the prompts. Listen and answer accordingly.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advanced Piloting Cruise Plot.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 5 Author: Julia Richards and R. Scott Hawley.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
1 Chapter 40 - Physiology and Pathophysiology of Diuretic Action Copyright © 2013 Elsevier Inc. All rights reserved.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) Customer Supplier Customer authorizes Enrollment ( )
REQ Enrollment in Demand Response Programs Process Flow Engineering Firm Retail Customer Demand Response Service Provider (DRSP) Distribution Company.
REQ Drop from Demand Response Programs Process Flow Retail Customer Demand Response Service Provider (DRSP) Distribution Company 1 Drop Request.
Document #07-12G 1 RXQ Customer Enrollment Using a Registration Agent Process Flow Diagram (Switch) Customer Supplier Customer authorizes Enrollment.
Document #07-12G 1 RXQ Customer Enrollment Using a Registration Agent Process Flow Diagram (Switch) Customer Supplier Customer authorizes Enrollment.
Document #07-2I RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) (mod 7/25 & clean-up 8/20) Customer Supplier.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 11: Structure and Union Types Problem Solving & Program Design.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
Multiplying binomials You will have 20 seconds to answer each of the following multiplication problems. If you get hung up, go to the next problem when.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 5 second questions
Peer-to-peer and agent-based computing P2P Algorithms.
Peer-to-peer and agent-based computing Basic Theory of Agency (Contd)
Around the World AdditionSubtraction MultiplicationDivision AdditionSubtraction MultiplicationDivision.
ZMQS ZMQS
CS16: Introduction to Data Structures & Algorithms
BT Wholesale October Creating your own telephone network WHOLESALE CALLS LINE ASSOCIATED.
Chapter 16 Sale and Lease of Goods McGraw-Hill/Irwin
© 2009 Prentice Hall Business Publishing Essentials of Economics Hubbard/OBrien, 2e. Fernando & Yvonn Quijano Prepared by: Chapter 4 Market Efficiency.
Data Structures: A Pseudocode Approach with C
ABC Technology Project
1 University of Utah – School of Computing Computer Science 1021 "Thinking Like a Computer"
© S Haughton more than 3?
25 July, 2014 Martijn v/d Horst, TU/e Computer Science, System Architecture and Networking 1 Martijn v/d Horst
5 August, 2014 Martijn v/d Horst, TU/e Computer Science, System Architecture and Networking 1 Martijn v/d Horst
© Charles van Marrewijk, An Introduction to Geographical Economics Brakman, Garretsen, and Van Marrewijk.
VOORBLAD.
1 4 Square Questions B A D C Look carefully to the diagram Now I will ask you 4 questions about this square. Are you ready?
Squares and Square Root WALK. Solve each problem REVIEW:
Do you have the Maths Factor?. Maths Can you beat this term’s Maths Challenge?
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
Chapter 5 Test Review Sections 5-1 through 5-4.
SIMOCODE-DP Software.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
11 = This is the fact family. You say: 8+3=11 and 3+8=11
Week 1.
So you want to create a PO Here’s how…. 1.Open RAPS and click the “Create” tab at the bottom of the screen.
We will resume in: 25 Minutes.
A SMALL TRUTH TO MAKE LIFE 100%
1 Unit 1 Kinematics Chapter 1 Day
PSSA Preparation.
Chapter 11 Describing Process Specifications and Structured Decisions
1 PART 1 ILLUSTRATION OF DOCUMENTS  Brief introduction to the documents contained in the envelope  Detailed clarification of the documents content.
How Cells Obtain Energy from Food
Presentation transcript:

peer-to-peer and agent- based computing “Implementation” of Auctions

peer-to-peer and agent-based computing – wamberto vasconcelos 2 A word on “implementation”... It’s not really Java It’s pseudo-code –Algorithms –Some elements of “realism” Purpose: –Flesh out details of what happens before/after messages are sent/received –Detail the information of each message –NOT to define “business logic” to use programs in eBay (thus maximising profit...)

peer-to-peer and agent-based computing – wamberto vasconcelos 3 English Auction “Official” standard from FIPA (

peer-to-peer and agent-based computing – wamberto vasconcelos 4 Auctioneer pseudocode (1) input: Agent id, good to sell g and its reserve price p, bidders B = {b 0,…,b n } output: winner  B and price fp  p or false (if no winner) auctioneer(id, B, p) 1. ac ← fresh auction id // e.g., time or a random number 2. winner ← nil; fp ← p // initialise winner and fp 3. for all b  B do send(id, b, inform-start-of-auction,  g, ac  ) 4. for all b  B do send(id, b, cfp,  g, fp, ac  ) 5. Msgs ← receiveMsgs (ac) // receive msgs 6.  Losers, hb, hp  ← processMsgs (fp, ac, Msgs) // get highest bid & losers 7. if hb = nil then // no “good” bids now 8. if winner = nil then return false // no previous winner 9. else // we had a previous winner 10. send(id, winner, request,  g, fp, ac  ) // request payment 11. B ’ ← B \ {winner } // get “other” bidders’ ids 12. for all b  B do send(id, b, inform,  g, fp, winner, ac  ) // inform who won 13. return  fp, winner, ac  // return winner 14. else 15. winner ← hb ; fp ← hp // update winner and current price 16. send(id, winner, accept-proposal,  g, fp, ac  ) // accept highest bid 17. for all  b, p   Losers do send(id, b, reject-proposal,  g, p, ac  ) 18. go to 4

peer-to-peer and agent-based computing – wamberto vasconcelos 5 Auctioneer pseudocode (2) input: Auction id ac output: set of received messages Msgs receiveMsgs(ac) 1. Msgs ←  2. patienceLimit ← while patienceLimit > 0 do 4. receive(m) // non-blocking receive; m = nil, if no msg 5. if m = nil then 6. patienceLimit ← patienceLimit  1 7. sleep 5ms 8. else 9. Msgs ←  Msgs  {m } 10. remove from Msgs messages with different ac 11. return Msgs

peer-to-peer and agent-based computing – wamberto vasconcelos 6 Auctioneer pseudocode (3) input: Current higher price fp, auction id ac, messages Msgs = {m 0,…,m n } output:  Losers,hb,hp  (Losers failed bids, hb/hp successful bidder/price) processMsgs(fp, ac, Msgs) 1. Losers ←  2. for all m  Msgs do 3. if m =  b, a, not-understood, ac  then Msgs ← Msgs – {m } // filter 4. if Msgs =  then return ,nil,nil  5. for all m  Msgs do 6. if m =  b, a, propose,  g, p, ac  then 7. if p < fp then // less than current highest offer? 8. Losers ← Losers  {  b, p  } // add to set of losers 9. Msgs ← Msgs – {m } // remove from msgs 10. pick m  Msgs such that m =  b, a, propose,  g, p, ac  11. hb ← b ; hp ← p 12. for all m  Msgs do 13. if m =  b, a, propose,  g, p, ac  then 14. if p > hp then // higher bid? 15. Losers ← Losers  {  hb, hp  } // previous highest is loser 16. hb ← b; hp ← p // update highest bidder and bid 17. else // equal bid? 18. Losers ← Losers  {  b, p  } // add to losers 17. return  Losers,hb,hp 

input: Ag. id, good g, highest price hp, increase % in bid inc output: price paid pp  hp or nil (if unsuccessful in auction) bidder(id, g, hp, inc) 1.Bid ← nil; pp ← nil 2.Msgs ← receiveMsgs // receive msgs 3.As ← {m  Msgs | m =  a, id, inform-start-of-auction,  g, ac  } // auctions of g 4.choose auction m  As, m =  a, id, inform-start-of-auction,  g, ac  5.Msgs ← receiveMsgs // receive msgs 6.CFPs ← {m  Msgs | m =  a, id, cfp,  g, p, ac  and p  hp } // get cfps 7.if CFPs =  then go to 1 // nothing of interest so far… peer-to-peer and agent-based computing – wamberto vasconcelos 7 Bidder pseudocode (1)

input: Agent id, good to buy g, highest price hp, increase % in bid inc output: price paid pp  hp or nil (if unsuccessful in auction) bidder(id, g, hp, inc) … 8.get from CFPs the lowest offer, m =  a, id, cfp,  g, p, ac  9.offer ← (p + (p  inc /100)) 10.if Bid = nil and offer  hp then // no pending bids & offer OK 11. send(id, a, propose,  g, offer, ac  ) 12. go to 5 13.if  a, id, accept-proposal,  g, p, ac   Msgs then // offer accepted 14. Bid ←  a, p, ac  15. go to 5 16.if  a, id, reject-proposal,  g, offer, ac   Msgs then // offer rejected 17. go to 1 18.if  a, id, inform,  g, p, winner, ac   Msgs then // someone won if id = winner then // it was me! 20. pp ← offer 21. //... wait for payment request; perform payment; etc return pp 23. else // someone else won return nil peer-to-peer and agent-based computing – wamberto vasconcelos 8 Bidder pseudocode (2)

input: Agent id, good to buy g, highest price hp, increase % in bid inc output: price paid pp  hp or nil (if unsuccessful in auction) bidder(id, g, hp, inc) 1.Bid ← nil; pp ← nil 2.Msgs ← receiveMsgs // receive msgs 3.As ← { m  Msgs | m =  a, id, inform-start-of-auction,  g, ac  } // get all auctions of good g 4.choose one of the auctions m  As, m =  a, id, inform-start-of-auction,  g, ac  5.Msgs ← receiveMsgs // receive msgs 6.CFPs ← { m  Msgs | m =  a, id, cfp,  g, p, ac  and p  hp } // get “affordable” cfps 7.if CFPs =  then go to 1 // nothing of interest so far… 8.get from CFPs the lowest offer, m =  a, id, cfp,  g, p, ac  9.offer ← (p + (p  inc /100)) 10.if Bid = nil and offer  hp then // no pending bids & offer OK 11. send(id, a, propose,  g, offer, ac  ) 12. go to 5 13.if  a, id, accept-proposal,  g, p, ac   Msgs then // offer accepted 14. Bid ←  a, p, ac  15. go to 5 16.if  a, id, reject-proposal,  g, offer, ac   Msgs then // offer rejected 17. go to 1 18.if  a, id, inform,  g, p, winner, ac   Msgs then // someone won if id = winner then // it was me! 20. pp ← offer 21. //... wait for payment request; perform payment; etc return pp 23. else // someone else won return nil peer-to-peer and agent-based computing – wamberto vasconcelos 9 Bidder pseudocode (3)

peer-to-peer and agent-based computing – wamberto vasconcelos 10 Issues The auction id is essential as there might be many auctions going on at the same time Cases: –No bidders –“normal” bidders –Bidders with the wrong auction/good id No need to record “round” of algorithm – why? –Algorithm deals with messages “out of order” –E.g.: the current highest bid is N and a “late” bidder has just sent a bid for the previous offer of N – 10

peer-to-peer and agent-based computing – wamberto vasconcelos 11 Issues (2) Could you extend auctioneer to cope with many goods with simultaneous auctions? –Each good would be associated with a different auction –Bids would not be confused as they are associated with an auction id Could you extend bidder to cope with many goods and a budget to buy them all? –Each item the bidder buys should reflect on the budget for the remaining items –Bidder should “leave” the auction (i.e., stop running) when budget is spent

peer-to-peer and agent-based computing – wamberto vasconcelos 12 Issues (3) Can you adapt the auctioneer and bidders so that they enact the Dutch auction?

peer-to-peer and agent-based computing – wamberto vasconcelos 13 Issues (4) Bidders may be outpriced They could join efforts: –Buying in bulk and splitting costs/goods How would bidders change to allow the formation of “co-operatives” –Overall purchase power is the sum of individual highest price –Bidders could use up part of their budget –One of the bidders would be the organiser In the English auction, the cooperative could be disbanded and reformed –When the price exceeds the limit of the cooperative then the cooperative is dissolved and another one re- formed