---
name: "PGASetPTournamentProb"
section: "3"
platform: "linux"
package: "pgapack"
version: "1.1.1-3"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/PGASetPTournamentProb"
---

# PGASetPTournamentProb(3)

Specifies the probability that the string that wins a binary tournament will be selected.

## NAME

PGASetPTournamentProb - Specifies the probability that the string that wins a binary tournament will be selected.

## DESCRIPTION

This function will have no effect unless PGA\_SELECT\_PTOURNAMENT was specified as the type of selection to use with PGASetSelectType.  The default value is 0.6.

## INPUT PARAMETERS

- ctx

  \- context variable

- p

  \- the probability of selecting the better string

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASetPTournamentProb(ctx, ptournament_prob)
PGAContext *ctx
double ptournament_prob
```

## LOCATION

select.c

## EXAMPLE

```
Example:
PGAContext *ctx;
:
PGASetPTournamentProb(ctx,0.8);
```
