Presentation is loading. Please wait.

Presentation is loading. Please wait.

MSD 2011 Midterm Karl Lieberherr 3/28/20111MSD midterm.

Similar presentations


Presentation on theme: "MSD 2011 Midterm Karl Lieberherr 3/28/20111MSD midterm."— Presentation transcript:

1 MSD 2011 Midterm Karl Lieberherr 3/28/20111MSD midterm

2 1. Strengthening 1.add to oppose actions in scg.cd: 1.OpposeRequest = Agree| Strengthen | Refute. 2.In scg.beh: AvatarI: strengthen public OpposeResponse strengthen(OpposeRequest request)? 3.Define how to use refutation protocol to deal with strengthening: Alice, proposes, Bob strengthens, Bob must defend strengthened claim against Alice. 3/28/20112MSD midterm

3 2. Confidence Add to claim definition in scg.cd update valid function for Claim: confidence must be in [0..1]. Make sure we have a valid function for Claim. Avatar propose needs to be updated: create claims with confidence. Random [0,1] for baby avatar. Influences playground level and SCG level. Reputation update: make a proposal: multiply old result with confidence. 3/28/20113MSD midterm

4 Game Design 1.The cd 2.valid 3.quality 4.Refutation protocol: ExistsForAll: “instance from Alice” + “Solution of 0 from Bob” 5.getResult: check if Bob’s solution has quality 1 3/28/20114MSD midterm

5 Interfaces, Knowledge and Skills of Playground Designer 1.SCG rules: how to play the game. 2.Domain Knowledge, e.g., CSP. 3.Define context-free grammars in EBNF style syntax 4.Write programs in data-binding technology (common in XML technology) (for baby avatar, etc.) 5.The more domains, protocols, we have the more the playground designer does configuration. 6.Finding InstanceSets that lead to interesting games. What are the niches for specialized, more efficient algorithms? 7.Request and Response object format for baby avatar. 3/28/20115MSD midterm

6 PG Designers about scg.cd Claim fields must be in a certain order. Styles of games Protocol language 3/28/20116MSD midterm

7 PG Designer about Protocols List of available protocols Should know basic predicate calculus (from logic) and the connection between games and predicate logic. Prenex normal form?: all quantifiers at beginning. Difference between mathematical claims (for which a winning strategy corresponds to a proof) and other claims that must be settled using the game. Need for a new protocol? Provide a valid protocol definition Protocol negation: same domain: roles of Alice and Bob are reversed and a defense is changed into a refutation. 3/28/20117MSD midterm

8 Not asked: Domain Designer Knows domain and standard solution approches. Knows about subdomains that have faster/customized solutions and offers those through instance sets. 3/28/20118MSD midterm

9 Protocol Negation !C=ExistsForAll !p instance from Alice solution sB of 0 from Bob check: sB has quality <= t Alice wins, Bob loses C=ForAllExists p instance from Bob solution sA from Alice check: sA has quality <=t Alice loses, Bob wins 3/28/20119MSD midterm

10 Protocol Negation 2 C = EA p(0,1) Alice claims Bob refutes instance from Alice solution of 0 from Bob Alice defends iff p(0,1) !C = AE !p(0,1) Alice claims Bob refutes instance from Bob solution of 0 from Alice Alice is refuted iff p(0,1) 3/28/2011MSD midterm10 Alice Bob, refute defense

11 Modules SCG Court – defines SCG rules and what must be provided by playground designer (structures, languages and interface implementations) Domain – defines languages and contracts of functions Protocol – scientific discourse and contract for outcome Playground: a configuration of a domain and claims in domain using protocol. 3/28/201111MSD midterm

12 Hiding Complexity It is important to hide complexity from playground designers and avatar designers. A playground designer needs an abstract view of scg.cd and scg.beh. She needs only the signatures and contracts of methods, not their implementation, and she needs the languages defined in scg.cd. An avatar designer needs an abstract view of the implementation provided by the playground designer. Signatures and contracts. Playground designer must provide contracts for avatar designer. 3/28/201112MSD midterm

13 Acceptance Test Design 2 closely related new games – MAX-SAT-ALL and MAX-SAT-SECRET Domain: CNFs – standard algorithm: generating a random assignment where each variable is set to true with probability p. – InstanceSets: Length(k) = clauses are exactly of length k. – quality(F,J) = fsat(F,J) = fraction of satisfied clauses. – valid(F,J) = all clauses in F evaluate to t or f – belongsTo(F,k) = all clauses use distinct literals and are of length k 3/28/2011MSD midterm13

14 MAX-SAT-ALL(k) Protocol: ForAllExists(F,J) and its negation Claims: MAX-SAT-ALL(k,t) = in CNFs in instance set Length(k) there exists an assignment of at least quality t. 3/28/2011MSD midterm14

15 MAX-SAT-SECRET(k) Protocol: PositiveSecret(F,JA,JB) and its negation Claims: MAX-SAT-SECRET(k,t) = in CNFs in instance set Length(k) Alice’s JA approximates Bob’s secret solution JB within t. fsat(F,J)>=t 3/28/2011MSD midterm15

16 The Actions of an Avatar 3/28/2011MSD midterm16 propose C1 oppose/refute C2 oppose/strengthen C3 agree C4 I=provideInstance(C5) S=solveInstance (I) Scholar

17 Flow Game FlowClaim(c,G) = Exists flow F in G with value(F) >= c. Domain 3/28/2011MSD midterm17

18 Design Document for SCG Court Evolution It is important to prepare a design document for SCG Court that can be given to future developers of SCG Court to prepare them for SCG Court maintenance and evolution tasks. This document should outline the architecture of the system, using pictures. It should outline the “philosophy” used by the implementation teams so that this philosophy can also be followed during system maintenance. 3/28/2011MSD midterm18

19 For example, the contract that the admin must check all incoming claim, instance and solution objects for validity (using valid(…) and belongsTo(…) must be mentioned. Please can the implementation teams write this document and present it at the last class. 3/28/2011MSD midterm19

20 agile development methodologies—and especially Extreme Programming—already incorporate the three keys to test automation: (1) testers and programmers are expected to work together as a single team, (2) the team treats test automation as a team responsibility and (3) testers are expected to be engaged and testing throughout, often writing tests before code’s been written. These tests, called acceptance tests, test the system from a customer perspective. The tests themselves are variously written by product programmers, dedicated testers, or analysts acting in the customer role. They use the testing framework created by the product programmers to execute the tests. This is a significant difference from the traditional arrangement that assigns the responsibility for test automation to an independent testing team. from: http://www.io.com/~wazmo/papers/design_for_testability_PNSQC.pdf 3/28/2011MSD midterm20

21 SCG train people to distinguish good claims from bad claims in a domain D where there is constructive evidence for defending good and refuting bad claims. good = true claim, optimal claim, recommended treatment for symptoms bad = false claim, non-optimal claim, non- recommended treatment for symptoms 3/28/2011MSD midterm21

22 Complexity distinguishing good claims from bad claims is hard. defending a good claim is easier refuting a bad claim is easier 3/28/2011MSD midterm22

23 Claims and, or, not, ForAll, Exists basic claims are decided by refutation protocol 3/28/2011MSD midterm23

24 Behaviors good – propose good claim and defend it. – agree with good claim and defend it and refute negation. – oppose bad claim and refute or strengthen it. bad – propose bad claim. – fail to refute bad claim defend good claim 3/28/2011MSD midterm24


Download ppt "MSD 2011 Midterm Karl Lieberherr 3/28/20111MSD midterm."

Similar presentations


Ads by Google