In order to generate these results, we gave each agent an opportunity to negotiate with each opponent (including in self-play) in each domain, and using both profiles. The domains included all those submitted by the participants, plus the Travel domain from ANAC2010, totalling 18 domains. Each negotiation was repeated 10 times, in order to produce statistically significant results. In total, this resulted in 52020 negotiations.

"; echo "

To calculate the rank of each agent, we used Welch's t test to check for statistically significant differences between the agents' scores. In more detail, we computed this for each pair of agents, to determine, with 95% confidence, which agents beat a specific agent, and which agents are beaten by that agent. For example, an agent which is beaten by two agents, and beats 12 agents (out of a total of 17) is considered to have rank 3-5. That is, with 95% certainty, its true rank lies between 3 and 5 (inclusive).

"; echo "

To select the qualifying agents, we identified all agents which have a possibility of a true rank in the top eight positions. Nine agents matched this criteria. The developers of IAMcrazyHaggler2012 (rank 7-9) chose to withdraw their entry from the final, leaving eight qualifying agents, highlighted in green in the table below.

"; echo "

By selecting an agent or domain from the tables below, you can view the results in more detail. By navigating through these tables, you can select an agent, an opponent and a domain in order to view the scores achieved in individual negotiations. By clicking the 'show details' link next to a domain, you can view an illustration of the full outcome space and other domain characteristics. All of the outcomes from the qualifying round are also available to download as a CSV file.

"; echo "

In the domain tables, the discounting factors (DF) and reservation values (RV) that were used in the qualifying round are shown. Note that for many of the domains which were not submitted with a discounting factor or reservation value, we have added these parameters.

"; } function finalText() { echo "

In order to generate these results, we gave each agent an opportunity to negotiate with each opponent (excluding in self-play) in each domain, and using both profiles. The domains included all 17 that were submitted by the participants this year, plus 5 from ANAC2011 and 2 from ANAC2010. Three variants of each of these 24 domains (with different discounting factors and reservation values) were used, totalling 72 domains. Each negotiation was repeated 10 times, in order to produce statistically significant results. In total, this resulted in 40320 negotiations.

"; echo "

To calculate the rank of each agent, we used Welch's t test to check for statistically significant differences between the agents' scores. In more detail, we computed this for each pair of agents, to determine, with 95% confidence, which agents beat a specific agent, and which agents are beaten by that agent. For example, an agent which is beaten by two agents, and beats 12 agents (out of a total of 17) is considered to have rank 3-5. That is, with 95% certainty, its true rank lies between 3 and 5 (inclusive).

"; echo "

By selecting an agent or domain from the tables below, you can view the results in more detail. By navigating through these tables, you can select an agent, an opponent and a domain in order to view the scores achieved in individual negotiations. By clicking the 'show details' link next to a domain, you can view an illustration of the full outcome space and other domain characteristics. All of the outcomes from the final round are also available to download as a CSV file (note that this file also includes self-play outcomes, but these are not included in the results reported on this site).

"; echo "

In the domain tables, the discounting factors (DF) and reservation values (RV) that were used are shown.

"; } if(!isset($_GET['v'])) { echo "

Presentation

"; echo "

In the ANAC2012 Session of the ACAN2012 Workshop, the competition and its results were presented. The presentation slides are available in .pptx or .pdf format.

"; echo "

Awards

"; echo "

The following awards were presented:

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
AwardAgentUniversityTeam Members
1st PlaceCUHKAgentThe Chinese University of Hong KongJianye Hao, Ho-fung Leung
2nd PlaceAgentLGBar-Ilan UniversityLuba Golosman
3rd PlaceOMACagentMaastricht UniversitySiqi Chen, Gerhard Weiss
3rd PlaceTheNegotiator ReloadedDelft University of TechnologyMark Hendrikx, Alex Dirkzwager
Best in Discounted DomainsCUHKAgentThe Chinese University of Hong KongJianye Hao, Ho-fung Leung
Best in Undiscounted DomainsTheNegotiator ReloadedDelft University of TechnologyMark Hendrikx, Alex Dirkzwager
Most Social AgentIAMhaggler2012University of SouthamptonColin R. Williams, Valentin Robu,
Enrico H. Gerding, Nicholas R. Jennings
"; echo "

Photos

"; echo "
"; echo "Photograph of organisers (Enrico H. Gerding, Valentin Robu and Colin R. Williams) presenting the first place winner (Jianye Hao) with his prize."; echo "Photograph of organisers (Enrico H. Gerding, Valentin Robu and Colin R. Williams) presenting Kobi Gal with the second place prize."; echo "Photograph of organisers (Valentin Robu, Colin R. Williams and Enrico H. Gerding) presenting the teams of joint third place winners (Siqi Chen, Gerhard Weiss, Alex Dirkzwager and Mark Hendrikx) with their prizes."; echo "Photograph of organisers (Valentin Robu and Colin R. Williams) presenting the winner of the Best in Discounted Domains award (Jianye Hao) with his prize."; echo "Photograph of organisers (Valentin Robu and Colin R. Williams) presenting the winners of the Best in Undiscounted Domains award (Mark Hendrikx and Alex Dirkzwager) with their prize."; echo "Photograph of organising committee members (Takayuki Ito and Catholijn Jonker) presenting the winners of the Most Social Agent award (Colin R. Williams, Enrico H. Gerding and Valentin Robu) with their prize."; echo "
Photographer: Tim Baarslag
"; echo "
"; echo "

Downloads

"; echo "

Domain files and agent code (.zip)

"; echo "

Detailed Results

"; echo "

See the results of each round in more detail:

"; echo ""; } else if($_GET['v'] == "qualifying" || $_GET['v'] == "final" || (isInternal() && ($_GET['v'] == "test" || $_GET['v'] == "extended" || $_GET['v'] == "risk" || substr($_GET['v'], 0, 5) == "spite" || $_GET['v'] == "thesis"))) { if($_GET['format'] != 'tex') { echo "
"; if(!is_null($domain)) { if(!is_null($agentA)) { if(!is_null($agentB)) { echo ""; echo ""; echo ""; echo ""; echo "
Selected domain:".renderDomain($domain)."Show all domains | ".renderDomainInfoLink($domain)."
Selected agent:".renderAgent($agentA)."
Selected opponent:".renderAgent($agentB)."Show all opponents
"; output(listAll($domain, $agentA, $agentB, 0), "Profile 1"); output(listAll($domain, $agentA, $agentB, 1), "Profile 2"); } else { echo ""; echo ""; echo ""; echo "
Selected domain:".renderDomain($domain)."Show all domains | ".renderDomainInfoLink($domain)."
Selected agent:".renderAgent($agentA)."Show all agents
"; output(listByOpponent($agentA, $domain)); } } else { echo ""; echo ""; echo "
Selected domain:".renderDomain($domain)."Show all domains | ".renderDomainInfoLink($domain)."
"; output(listByAgent($domain)); } //echo "

"; } else { if(!is_null($agentA)) { if(!is_null($agentB)) { echo ""; echo ""; echo ""; echo "
Selected agent:".renderAgent($agentA)."
Selected opponent:".renderAgent($agentB)."Show all opponents
"; output(listByDomain($agentA, $agentB)); } else { echo ""; echo ""; echo "
Selected agent:".renderAgent($agentA)."Show all agents
"; output(listByOpponent($agentA)); output(listByDomain($agentA)); } } else { if($_GET['v'] == 'qualifying') { qualifyingText(); } else { finalText(); } output(listByAgent()); output(listByDomain()); } } echo "
"; } else { if(isset($domain) && $domain != '') { list($table, $heading) = output(listByAgent($domain)); latexTable('|c||c|r|', 'Scores in the '.renderDomainTex($domain).', with $95\%$ confidence intervals.', 'scores-'.$domain, $table, $heading); } elseif(isset($_GET['by'])) { switch($_GET['by']) { case 'df': $gvals = array(0.50, 0.75, 1.00); $gheadings = '\delta = '; $gkey = 'df'; $gname = 'discounting factor'; break; case 'rv': $gvals = array(0.0, 0.25, 0.50); $gheadings = 'u_{\overline{\alpha}} = '; $gkey = 'rv'; $gname = 'utility of conflict'; break; case 's': $gvals = array('S', 'M', 'L'); $gheadings = array('S' => '|O| \leq 200', 'M' => '200 < |O| \leq 3500', 'L' => '3500 < |0|'); $gkey = 's'; $gname = 'size'; break; case 'c': $gvals = array('L', 'M', 'H'); $gheadings = array('L' => 'C(O) \leq 0.22', 'M' => '0.22 < C(O) \leq 0.30', 'H' => '0.30 < C(O)'); $gkey = 'c'; $gname = 'competitiveness'; break; } list($t, $h) = output(listByAgent()); foreach($t as $row) { $agents[] = $row[1]; $s = explode(' ', $row[2], 2); $scores[$row[1]]['mean'] = array($row[0], str_replace('$', '', $s[0])); } $heading = '\multirow{2}{*}{Agent}'; $heading .= ' & \multicolumn{8}{|c|}{Score (Rank)} \\\\'."\n"; $heading .= ' & \multicolumn{2}{|c|}{mean}'; foreach($gvals as $v) { $_GET[$gkey] = $v; $table = getTable(); list($t, $h) = output(listByAgent()); foreach($t as $row) { $s = explode(' ', $row[2], 2); $scores[$row[1]][$v.''] = array($row[0], str_replace('$', '', $s[0])); } if(is_array($gheadings)) { $heading .= ' & \multicolumn{2}{|c|}{$'.$gheadings[$v].'$}'; } else { $heading .= ' & \multicolumn{2}{|c|}{$'.$gheadings.sprintf('%.2f', $v).'$}'; } } $heading .= '\\\\'."\n"; foreach($agents as $agent) { $row = array(); $row[] = $agent; array_unshift($gvals, 'mean'); foreach($gvals as $v) { if(substr($scores[$agent][$v.''][0], 0, 1) == '1') { $row[] = '{\bf '.$scores[$agent][$v.''][1].'}'; $row[] = '{\bf ('.$scores[$agent][$v.''][0].')}'; } else { $row[] = $scores[$agent][$v.''][1]; $row[] = '('.$scores[$agent][$v.''][0].')'; } } array_shift($gvals); $tagg[] = $row; } latexTable('|c||cc|cc|cc|cc|', 'Scores and ranks across all scenarios, grouped by '.$gname.', with winning scores marked in bold.', 'scores-by-'.str_replace(' ', '-', $gname), $tagg, $heading, '\small'); } else { list($table, $heading) = output(listByAgent()); latexTable('|c||c|r|', 'Scores across all scenarios, with $95\%$ confidence intervals.', 'scores-all', $table, $heading); } } } if($_GET['format'] != 'tex') { outputFooter(); } function welchAll($data) { foreach($data as $a) { $above[$a[0]] = 0; $below[$a[0]] = 0; } foreach($data as $a) { foreach($data as $b) { if(welch($a, $b)) { $above[$b[0]]++; $below[$a[0]]++; } } } return array(count($data), $above, $below); } function getT($i) { $tvals = array(12.7062047361747, 4.30265272974946, 3.18244630528371, 2.77644510519779, 2.57058183563631, 2.44691185114497, 2.36462425159279, 2.30600413520417, 2.26215716279820, 2.22813885198627, 2.20098516009164, 2.17881282966723, 2.16036865646279, 2.14478668791780, 2.13144954555977, 2.11990529922126, 2.10981557783331, 2.10092204024104, 2.09302405440831, 2.08596344726587, 2.07961384472768, 2.07387306790402, 2.06865761041905, 2.06389856162803, 2.05953855275330, 2.05552943864287, 2.05183051648028, 2.04840714179525, 2.04522964213270, 2.04227245630124, 2.03951344639641, 2.03693334346010, 2.03451529744934, 2.03224450931772, 2.03010792825034, 2.02809400098045, 2.02619246302911, 2.02439416391197, 2.02269092003676, 2.02107539030628, 2.01954097044138, 2.01808170281844, 2.01669219922783, 2.01536757444376, 2.01410338888085, 2.01289559891943, 2.01174051372977, 2.01063475762423, 2.00957523712924, 2.00855911210076, 2.00758377031583, 2.00664680506169, 2.00574599531787, 2.00487928818806, 2.00404478328915, 2.00324071884787, 2.00246545929101, 2.00171748414524, 2.00099537808826, 2.00029782201427, 1.99962358499493, 1.99897151703338, 1.99834054252075, 1.99772965431770, 1.99713790839200, 1.99656441895231, 1.99600835402530, 1.99546893142985, 1.99494541510723, 1.99443711177119, 1.99394336784563, 1.99346356666187, 1.99299712588986, 1.99254349518093, 1.99210215400225, 1.99167260964467, 1.99125439538838, 1.99084706881169, 1.99045021023014, 1.99006342125445, 1.98968632345691, 1.98931855713658, 1.98895978017516, 1.98860966697571, 1.98826790747722, 1.98793420623902, 1.98760828158908, 1.98728986483118, 1.98697869950629, 1.98667454070377, 1.98637715441862, 1.98608631695113, 1.98580181434582, 1.98552344186659, 1.98525100350549, 1.98498431152245, 1.98472318601398, 1.98446745450848, 1.98421695158642, 1.98397151852354); return $tvals[min($i, 29)]; } function welch($a, $b) { $X[] = $a[1]; $X[] = $b[1]; $var[] = $a[2]; $var[] = $b[2]; $n[] = $a[3]; $n[] = $b[3]; $varon[] = $var[0]/$n[0]; $varon[] = $var[1]/$n[1]; //$tvals = array(6.31375151467504, 2.91998558035373, 2.35336343480182, 2.13184678632665, 2.01504837333302, 1.94318028051530, 1.89457860509001, 1.85954803753090, 1.83311293265624, 1.81246112281168, 1.79588481870404, 1.78228755564932, 1.77093339598687, 1.76131013577489, 1.75305035569257, 1.74588367627625, 1.73960672607507, 1.73406360661754, 1.72913281152137, 1.72471824292079, 1.72074290281188, 1.71714437438024, 1.71387152774705, 1.71088207990943, 1.70814076125190, 1.70561791975927, 1.70328844572213, 1.70113093426593, 1.69912702653350, 1.69726088659396, 1.69551878254586, 1.69388874838371, 1.69236030903035, 1.69092425518686, 1.68957245778027, 1.68829771411681, 1.68709361959626, 1.68595446016672, 1.68487512171124, 1.68385101333563, 1.68287800213271, 1.68195235746754, 1.68107070320248, 1.68022997657216, 1.67942739265235, 1.67866041355688, 1.67792672164181, 1.67722419612432, 1.67655089261690, 1.67590502516311, 1.67528495042490, 1.67468915372601, 1.67411623670311, 1.67356490635215, 1.67303396528989, 1.67252230307558, 1.67202888846089, 1.67155276245484, 1.67109303210392, 1.67064886490453, 1.67021948377377, 1.66980416251198, 1.66940222170677, 1.66901302502399, 1.66863597584755, 1.66827051422767, 1.66791611410736, 1.66757228079659, 1.66723854866866, 1.66691447905590, 1.66659965832847, 1.66629369613152, 1.66599622377140, 1.66570689273403, 1.66542537332249, 1.66515135340464, 1.66488453725822, 1.66462464450659, 1.66437140913649, 1.66412457858962, 1.66388391292254, 1.66364918402906, 1.66342017491887, 1.66319667904888, 1.66297849970190, 1.66276544940906, 1.66255734941286, 1.66235402916680, 1.66215532586967, 1.66196108403010, 1.66177115506171, 1.66158539690322, 1.66140367366493, 1.66122585529662, 1.66105181727731, 1.66088144032486, 1.66071461012305, 1.66055121706575, 1.66039115601696, 1.66023432608549); if($X[0] == $X[1]) { return false; } $denom = sqrt($varon[0] + $varon[1]); if($denom == 0) { return ($X[0] > $X[1]); } $t = ($X[0] - $X[1]) / $denom; $v = pow($varon[0] + $varon[1], 2) / ($varon[0]*$varon[0]/($n[0]-1) + $varon[1]*$varon[1]/($n[1]-1)); return getT(floor($v) - 1) < $t; } function output($table, $title="") { if(count($table) == 0) return; $keys = array_keys($table[0]); if(in_array('Agent', $keys, true) && in_array('Agent_Mean', $keys, true) && in_array('Agent_Var', $keys, true) && in_array('_Count', $keys, true)) { foreach($table as $row) { $data[$row[0]] = array($row[0], $row['Agent_Mean'], $row['Agent_Var'], $row['_Count']); } list($n, $above, $below) = welchAll($data); } if($_GET['format'] != 'tex') { echo "
"; if($title != "") { echo "

$title

"; } echo ""; echo ""; if(isset($n)) echo ""; foreach($keys as $key) { if(is_int($key)) continue; if($key[0] == '_') continue; echo ""; if($key == "Domain") echo ""; foreach($table as $row) { if(isset($row['Agent']) && qualified($row['Agent'])) { echo ""; } else { echo ""; } if(isset($n)) { if($above[$row[0]]+1 == $n-$below[$row[0]]) echo ""; else echo ""; } foreach($keys as $key) { if(is_int($key)) continue; if($key[0] == '_') continue; echo ""; } echo ""; } echo "
Rank"; if($key == 'DF') echo "DF"; elseif($key == 'RV') echo "RV"; elseif($key == 'Agent_Mean') echo "Mean Score"; elseif($key == 'Agent_Var') echo "Variance"; //echo "Standard Deviation"; //echo "Standard Error"; else echo str_replace('_', ' ', $key); echo ""; } echo "
".($above[$row[0]]+1)." ".($above[$row[0]]+1)."-".($n-$below[$row[0]]).""; echo renderCell($row[$key], $key); echo "
"; echo "
"; } else { if(isset($n)) $heading[] = 'Rank'; foreach($keys as $key) { if(is_int($key)) continue; if($key[0] == '_') continue; if($key == 'Agent_Var') continue; if($key == 'Agent_Mean') { $heading[] = "Score"; } else { $heading[] = str_replace('_', ' ', $key); } } foreach($table as $row) { $mrow = array(); if(isset($n)) { if($above[$row[0]]+1 == $n-$below[$row[0]]) $mrow[] = ($above[$row[0]]+1); else $mrow[] = ($above[$row[0]]+1)."-".($n-$below[$row[0]]); } foreach($keys as $key) { if(is_int($key)) continue; if($key[0] == '_') continue; if($key == 'Agent_Var') continue; $mrow[] = renderCellTex($row, $key); } $mtable[] = $mrow; } return array($mtable, $heading); } } function renderCellTex($row, $key, $s=null) { if(is_null($s)) $s = $row[$key]; if($key == "Agent_Mean") { return renderCellTex($row, '', $s).renderCellTex($row, 'Agent_Var'); } if($key == "Agent_Var") { $s = getT($row['_Count'])*sqrt($s)/sqrt($row['_Count']); } switch($key) { case "Domain": return renderDomain($s); case "Agent": case "Opponent": if($_GET['format'] == "tex") return str_pad(renderAgent($s, false), 25); else return renderAgent($s); default: if(is_numeric($s)) { $s = sprintf('%.3f', round($s, 3)); } if($key == "Agent_Var") { return " {\\scriptsize $\\pm $s$}"; } else { return "$$s$"; } } } function renderCell($s, $key) { // if($key == "Agent_Var") // { // $s = sqrt($s)/sqrt(10); // } switch($key) { case "Domain": return "".renderDomain($s)."".renderDomainInfoLink($s); case "Agent": case "Opponent": return "".renderAgent($s).""; default: if(is_numeric($s)) { if(round($s) == $s) return $s; if($s > 0.01) return sprintf('%.3f', round($s, 3)); else return sprintf('%.6f', round($s, 6)); //return "X".sprintf('%.10f', 1.96*sqrt(round($s, 10))/sqrt(10))."X"; } return $s; } } function renderDomain($s) { $q = 'SELECT name FROM domain WHERE code = ?'; $d = query($q, array($s)); if(count($d) == 0) return "[$s]"; return $d[0]['name']; } function renderDomainTex($s) { if(strlen($s) == 1) { $q = 'SELECT name FROM domain WHERE SUBSTR(code, 2, 1) = ? AND owner IS NULL'; } else { $q = 'SELECT name, df, rv FROM domain WHERE code = ?'; } $d = query($q, array($s)); if(count($d) == 0) return "[$s]"; if(strlen($s) == 1) { return $d[0]['name'].' Scenario (averaged over $\delta \in \{0.50, 0.75, 1.00\}, u_{\overline{\alpha}} \in \{0.00, 0.25, 0.50\}$)'; } else { return $d[0]['name'].' Scenario (with $\delta='.sprintf('%.2f', $d[0]['df']).', u_{\overline{\alpha}}='.sprintf('%.2f', $d[0]['rv']).'$)'; } } function renderDomainInfoLink($s, $search='code') { $q = 'SELECT year, id, link FROM domain WHERE '.$search.' = ?'; $d = query($q, array($s)); if(count($d) == 0) return ""; if($d[0]['year'] == "") { if($d[0]['link'] > 0) { return renderDomainInfoLink($d[0]['link'], 'id'); } return ""; } return "Show details"; } function renderAgent($s, $includeInstitution=true) { $s = modifyClassname($s); $q = 'SELECT agentname, institution FROM users WHERE agentclass = ?'; $d = query($q, array($s)); if(count($d) == 0) return "{{$s}}"; if($includeInstitution) { return $d[0]['agentname'].', '.$d[0]['institution']; } else { return $d[0]['agentname']; } } function qualified($s) { $s = modifyClassname($s); $q = 'SELECT qualified FROM users WHERE agentclass = ?'; $d = query($q, array($s)); if(count($d) == 0) return false; return ($d[0]['qualified'] == 1); } function modifyClassname($s) { if($s == "thenegotiatorreloaded.TheNegotiatorReloaded") return "travelingsalesman.TravelingSalesman"; if($s == "agents.OMAC_sp2012b.OMAC_sp2012b") return "agents.OMAC_sp2012.OMAC_sp2012"; if($s == "agents2012.southampton.IAMhaggler2012a0") return "agents2012.southampton.IAMhaggler2012"; return $s; } function rlink($s, $key) { global $domain; global $agentA; global $agentB; $lparts = array($domain, $agentA, $agentB); if($lparts[0] == null) $lparts[0] = "*"; switch($key) { case "Domain": $lparts[0] = $s; break; case "Agent": $lparts[1] = $s; break; case "Opponent": $lparts[2] = $s; break; } while(count($lparts) > 0 && $lparts[count($lparts)-1] == "") array_pop($lparts); if(count($lparts) == 1 && $lparts[0] == "*") return "/results/".$_GET['v'].'/'; return "/results/".$_GET['v'].'/'.implode('/', $lparts); } function listByDomain($agentA = null, $agentB = null) { global $cols; global $table; global $batchID; $where = array(); $params = array(); if(!is_null($agentA)) { $where[] = "agentA = ?"; $params[] = $agentA; if(!is_null($agentB)) { $where[] = "agentB = ?"; $params[] = $agentB; } } $where = getWhere($where); $q = "SELECT domain as Domain, $cols FROM $table $where GROUP BY domain, $batchID"; $q = average($q, 'Domain', ', DF, RV', ' JOIN domain d ON d.code = x.domain'); return query($q, $params); } function listByAgent($domain = null) { global $cols; global $table; global $batchID; $where = array(); $params = array(); if(!is_null($domain)) { if(strlen($domain) == 1) { $where[] = "SUBSTR(domain, 2, 1) = ?"; } else { $where[] = "domain = ?"; } $params[] = $domain; } $where = getWhere($where); $q = "SELECT agentA as Agent, $cols FROM $table $where GROUP BY agentA, $batchID"; $q = average($q, 'Agent'); return query($q, $params); } function listByOpponent($agent, $domain = null) { global $cols; global $table; global $batchID; $where = array(); $params = array(); $where[] = "agentA = ?"; $params[] = $agent; if(!is_null($domain)) { $where[] = "domain = ?"; $params[] = $domain; } $where = getWhere($where); $q = "SELECT agentB as Opponent, $cols FROM $table $where GROUP BY agentB, $batchID"; $q = average($q, 'Opponent'); return query($q, $params); } function listAll($domain, $agentA, $agentB, $side) { global $cols; global $table; $fullcols = preg_replace('/avg\(([a-zA-Z]+)\)/', '\1', $cols); $fullcols = str_replace(', count(*) as _Count', ', SUBSTRING(id, 5, 2) as repetition', $fullcols); $where = array(); $params = array(); $where[] = "agentA = ?"; $params[] = $agentA; $where[] = "agentB = ?"; $params[] = $agentB; $where[] = "domain = ?"; $params[] = $domain; $where[] = "n = ?"; $params[] = $side; $where = getWhere($where); $q = "SELECT $fullcols FROM $table $where ORDER BY SUBSTRING(id, 5, 2)"; $params = array($agentA, $agentB, $domain, $side); return query($q, $params); } function getWhere($where) { global $excludeSelfPlay; if($excludeSelfPlay) { $where[] = "agentA != agentB"; } if(count($where) > 0) { return "WHERE ".implode(" AND ", $where); } else { return ""; } } /* function outputDomainChooser($domain) { echo "\n"; } function outputAgentAChooser($agentA) { echo "\n"; } function outputAgentBChooser($agentB) { echo "\n"; } function domainLink($str, $current) { if($current) { echo '
  • '.$str.'
  • '; } else { echo '
  • '.$str.'
  • '; } } */ ?>