Difference between revisions of "Problem.yaml"

From PC2wiki
Jump to: navigation, search
m (fix minor typo)
(updated CLICS Validator details)
Line 61: Line 61:
 
=== CLICS Validator ===
 
=== CLICS Validator ===
  
  #Validator configuration for the problem
+
The CLICS validator operates by breaking the input into space-separated tokens. It then checks to see whether a token represents a floating-point value; this is done by using the Java method <code>Double.parseDouble(String)</code> -- any String which this method understands to be a valid Double is considered a floating-point token.  If a float tolerance has been specified (either float_absolute_tolerance or float_relative_tolerance or both), then the input tokens are checked for compliance with the specified tolerance. 
#(defaults if corresponding flag is omitted: NOT case-sensitive, NOT space-sensitive, NO float tolerances)
+
 
 +
  #Example CLICS Validator configuration for the problem
 
   
 
   
  validator_flags: case_sensitive space_change_sensitive float_absolute_tolerance 0.001 float_relative_tolerance 1.
+
  <code>validator_flags: case_sensitive space_change_sensitive float_absolute_tolerance 0.001 float_relative_tolerance 1.</code>
+
 
  # case_sensitive - if not present then false.
+
  # case_sensitive - true if this flag is present.
  # space_change_sensitive  - if not present then false
+
  # space_change_sensitive  - true if this flag is present
  # float_absolute_tolerance 0.001 - if not present TODO
+
  # float_absolute_tolerance d.ddd - the floating-point absolute tolerance to be enforced
  # float_relative_tolerance 1. - if not present TODO
+
  # float_relative_tolerance d.ddd - the floating-point relative tolerance to be enforced
 +
# defaults if corresponding flag is omitted: NOT case-sensitive, NOT space-sensitive, NO float tolerances
  
 
=== Judging Types ===
 
=== Judging Types ===

Revision as of 16:59, 8 November 2019

The problem.yaml is one part of the set of files that compose a problem description and data files.

See the article Problem Format for a complete list of files that describe a problem.

Contents of problem.yaml

problem.yaml keys
Key Comments Example
source optional ICPC World Finals 2011
author optional, defaults to "Unknown"
license optional, defaults to "cc by-sa"
rights_owner mandatory ICPC
keywords optional
difficulty optional
limits problem limitations
validator validator options case_sensitive space_change_sensitive


PC^2 problem.yaml keys
Key Comments Example
name Problem Title Sumit Sample Problem

The problem name will typically be fetched from the Problem.tex file rather than using the name key.


Problem Time Out Limits

#Run-time Limit for the problem, in whole seconds
limits:
    timeout: 2

PC^2 Validator

validator: 
    validatorProg: 'edu.csus.ecs.pc2.validator.clicsValidator.ClicsValidator'
    validatorCmd: '{:validator} {:infile} {:ansfile} {:feedbackdir} '
    usingInternal: false
    validatorOption: 1
    use-internal-validator: false

CLICS Validator

The CLICS validator operates by breaking the input into space-separated tokens. It then checks to see whether a token represents a floating-point value; this is done by using the Java method Double.parseDouble(String) -- any String which this method understands to be a valid Double is considered a floating-point token. If a float tolerance has been specified (either float_absolute_tolerance or float_relative_tolerance or both), then the input tokens are checked for compliance with the specified tolerance.

#Example CLICS Validator configuration for the problem

validator_flags: case_sensitive space_change_sensitive float_absolute_tolerance 0.001 float_relative_tolerance 1.
# case_sensitive - true if this flag is present.
# space_change_sensitive  - true if this flag is present
# float_absolute_tolerance d.ddd  - the floating-point absolute tolerance to be enforced
# float_relative_tolerance d.ddd - the floating-point relative tolerance to be enforced
# defaults if corresponding flag is omitted: NOT case-sensitive, NOT space-sensitive, NO float tolerances

Judging Types

#How the system handles judging for the problem
judging-type:
    #Whether or not there will be an "Auto-Judge" used for this problem
    computer-judged: true

    #Whether or not there will be manual review of submissions following auto-judging
    manual-review: true

    #Whether or not teams should be sent a "Preliminary Notification" of the initial (computer) judgement
    send-prelim-judgement: true

Input data source

#How the system manages input sent to team submissions 
input:

   #Whether the team submission is to read its input from stdin: yes if "true", no (meaning "open and read from a file") if false or missing
   readFromSTDIN: true

Read input from stdin

input:
    readFromSTDIN: true

Read input from a file

input:
    readFromSTDIN: false

Stop of first failure

#Whether (true) or not (false) to stop execution upon the first occurrence of a failed test case
stop-on-first-failed-test-case: true

Default is false, the system will test all data sets

Sample problem.yaml files

Minimal sample with problem name

# Problem configuration
source: ICPC Mid-Atlantic Regional Contest
author: John von Judge 
rights_owner: ICPC

# pc2-specific key 
name: Sumit Sample Problem

The source, author, and rights_owner are optional.

Sample 2

name: 'Sumit file comp + manual file pc2val'
source: 
author: 
license: 
rights_owner: 

validator_flags: 

limits:
    timeout: 30

judging-type:
    computer-judged: false
    manual-review: true
    send-prelim-judgement: false

input:
    readFromSTDIN: false

Sample 3

# Problem configuration, version 1.0 
# PC^2 Version: Version 9.3 20130117 (Thursday, January 17th 2013 06:10 UTC) Java ver 1.6.0_22 build 2591 Windows 7 6.1 (x86) 
# Created: 2013-03-15 14:42:06 PDT
--- 

name: Practice
source: 
author: 
license: 
rights_owner: 

limits:
   #Run-time Limit for the problem, in whole seconds
   timeout: 10

# CLICS Validator configuration for the problem
#(defaults if corresponding flag is omitted: NOT case-sensitive, NOT space-sensitive, NO float tolerances)
validator_flags: case_sensitive space_change_sensitive float_absolute_tolerance 0.001 float_relative_tolerance 1.0
   
#Whether (true) or not (false) to stop execution upon the first occurrence of a failed test case
stop-on-first-failed-test-case: true

#How the system handles judging for the problem
judging-type:
    #Whether or not there will be an "Auto-Judge" used for this problem
    computer-judged: true
    #Whether or not there will be manual review of submissions following auto-judging
    manual-review: true
    #Whether or not teams should be sent a "Preliminary Notification" of the initial (computer) judgement
    send-prelim-judgement: true
   
#How the system manages input sent to team submissions 
input:
   #Whether the team submission is to read its input from stdin: yes if "true", no (meaning "open and read from a file") if false or missing
   readFromSTDIN: true

See Also