jonremy / graph-theory

some graph theory algorithms with CI scoring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graph Theory Playground

Build Status

Some graph theory algorithms with CI scoring

How to play

Add your python submission file to problem-#/submissions folder.
Example of submission file:

from submission import Submission

class MyAwesomeSubmission(Submission):

    def author(self):
        return 'unique name'

    def run(self, input):
        # input and output format are given in the
        # README file inside problem folder

        ...

        return output

once your run function is completed, you can run python main.py to see your ranking.

How to add a problem

Add a new folder problem-[n+1] with a README file and a judge.py file where you can specify how submissions could be validated and scored.
Example of judge.py file:

from judge import Judge

class MyAwesomeProblem(Judge):

    def name(self):
        return 'unique name'

    def generate_input(self):
        # Generates a test input object
        # You can use optionally randomize inputs
        ...

    def validate(self, input, output):
        # Validates a submission output
        # should return a boolean
        ...

    def score(self, input, output):
        # Scores a submission
        # should return a number
        ...

    def compare(self, a, b):
        # Compares Scores
        # Should return 1  if a is better than b
        #               0  if a and b are the same
        #               -1 if b is better than a
        ...

About

some graph theory algorithms with CI scoring

License:MIT License


Languages

Language:Python 100.0%