Upload
lucas-ferguson
View
216
Download
1
Tags:
Embed Size (px)
Citation preview
SADNA – Ad Auction
Session #2
Yishay MansourMariano Schain
Last Week:Overview and Theoretical Background
Today:Software Infrastructure
•System Elements (Reminder)
•Agent Execution
• Software Architecture
• A Sample Agent
Reminder
System ElementsUser
Publisher/Auctioneer
Query
Advertiser
Auction
Impression Page ViewClick Conversion
Bid, Ad, Limit
Query Reports
Sales Reports
3
32a
2b
2c
1
Execution• Server
– Manages agents– Schedules games – Simulates Users and Publisher– Sends reports to agents– Publish simulation logs
• Agent (Client)– Register at server web page– Joins games– Implements Advertiser– Sends bids to server– May use logs to learn
Server
Agent
Agent
Agent
WebBrowser
RegistrationGame ViewerLogs Access
Game
Agent Execution - Steps
1. Files and Directories• config• lib• logs
2. Agent Configuration File• Name and Password• Server name• Auto join• Logging levels
3. Register Agent At Server • http://server:8080• Name And Password
4. Run Jar• run-agent.sh• Or… from IDE (e.g. eclipse)• Or… java -server -cp $CLASSPATH
edu.umich.eecs.tac.aa.agentware.Main
Agent Execution - Demo
• Setup IDE (Eclipse)
• Run Agent from IDE
• Server: Game Viewer
• Post game: Log Viewer
Software Architecture - Motivation• Modeling:
– User populations dynamics– Competing Advertisers strategy– cpc and #Impressions for a given (bid, query)– Note: Bursts
• Estimation– Click and Conversion rates– Profit and #sales for a given bid bundle– Note: Promoted Slots
• Optimization– Find bid bundle that maximizes profits– Next day, Until end of game– Note: Capacity Window
Agent Software ArchitectureModel
competitors
users
Estimation
clickRate
convRate
Optimization
singleDay multiDay
Control
Game instance parameters:Capacity, Specialty
Daily Reports:Server, Self
Profit, Sales (bids, day, used_capacity)
Bid
singleGame
multiGame
Optimal Bid (cap,#s)
Train (Past Games)
Cpc, Position (q,bid)
Cpc, #Impr, Pos (q,bid)
#Conv #Click #Impr (query, bid, ad, limit, day, used_capacity)
Agent Software Architecture
Agent
TauAgent
AgentComponent
Optimizer
IAgent
IAgentComponent
IOptimizer
YourOptimizer
TauAgent
YourOptimizer
YourEstimator
YourModeler
Class Diagram Object Diagram
Agent Software ArchitectureConfiguration
• All configuration files in config directory• Top level configuration:
– Name and password, logging, etc’
• Architecture configuration– Name of class implementing each component – Name of config file for each component
• Component configuration file– Any specific parameters (e.g. algorithm constants)– Accessed using the ConfigManager class interface
(implemented by the aaConfig member of AgentComponent)
Agent Software ArchitectureTraining
LogHandler
TauTrainer TauParser
YourParser
TauTrainer
YourParser
Class Diagram Object Diagram
• Logs contain ALL messages to/from server to/from ALL agents!!• LogHandler called by logtool.Main• Single/Multiple simulation log files (sim.slg)• YourParser updates component database (to be used at game)• Reset/Incremental training
Parser
Sample Agent• Illustrate usage of interfaces
– Passing server messages– Configuration parameters
• Almost trivial Modeler and Estimator– Simple daily update of parameters’ estimate
based on past day results
• Optimizer:– Capacity quota: based on capacity window
usage level– Quota fractionally allocated to queries based on
past performance (profits per unit sold)
Create Your Own Agent - Steps
1. Files and Directories• Start with sample agent• Update config files:
• arch.conf• Component config files
2. Implement your own Components
• Replace: SampleModeler, SampleEstimator, SampleOptimizer
• Stick to Interfaces
3. Compete and Analyze • Dummies are Dummies..• Use log viewer• Train using game logs from
server
4. Repeat..
Sample Agent - Demo• Arrange files and populate IDE
– src, lib, config– Create IDE project
• Update configuration files
• Configure execution– Run/debug, Main, etc’
• Run Agent– Fetch simulation logs
Appendix: Run your own Server
1. Files and Directories• lib• Config• logs
2. Server Configuration Files• server.conf: Admin Password,
Ports, Logging levels• Name of game settings
configuration• Game_settings.conf
3. runserver.sh
4. Register Agents At Server