source: java/ecj/cecj/problems/TestBasedProblem.java @ 35

Last change on this file since 35 was 28, checked in by mszubert, 16 years ago

cecj - coEvolutionary Computation in Java with additional games package

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 533 bytes
Line 
1package cecj.problems;
2
3import cecj.interaction.InteractionResult;
4import cecj.utils.Pair;
5import ec.EvolutionState;
6import ec.Individual;
7import ec.Problem;
8
9public abstract class TestBasedProblem extends Problem implements CoevolutionaryProblem {
10
11        public abstract Pair<? extends InteractionResult> test(EvolutionState state, Individual candidate,
12                        Individual test);
13       
14        public boolean solves(EvolutionState state, Individual candidate, Individual test) {
15                return (test(state, candidate, test).first.getNumericValue() > 0);
16        }
17}
Note: See TracBrowser for help on using the repository browser.