Feather pecking represents a serious problem in the poultry industry that can negatively affect production as well as the welfare of laying hens. Although feather pecking has been studied from many different angles, there are only a few studies of the relationship between feather pecking and cognition. This study aims to compare the cognitive performance of hens from the high feather pecking (HFP) and the low feather pecking (LFP) lines in a visual discrimination (Go/No-Go) task and to study their decision making under ambiguity using the judgment bias test.Twenty HFP and 20 LFP hens were trained in a visual discrimination task to approach a coloured feeder (white for half of the hens and black for the other half) containing a reward (one mealworm) and to refrain from approaching a feeder with a different colour (colour opposite to positive, i.e. black or white) to avoid punishment (water spraying). During the subsequent judgment bias tests hens were tested in the presence of the positive, negative or ambiguous stimulus (grey coloured feeder), always one type of stimulus at a time. The latencies to reach each of the stimuli were recorded. At the end of the visual discrimination training phase, 36 out of 40 hens successfully discriminated the positive and the negative coloured feeder. There was a slower association of the coloured feeder with the reward in the HFP line and HFP hens did not suppress the response to the negative stimulus as effective as HFP hens, which could be a sign of their high motor impulsiveness. However, in the judgment bias test HFP hens approached the ambiguous feeder significantly faster than LFP hens (HFP 13.59 ± 1.11 s, LFP 16.68 ± 1.10 s, P < 0.05), that can be interpreted as evidence that hens from the HFP line are more optimistic, i.e. that they are in a more positive affective state. The high motor impulsiveness of HFP hens provides another possible explanation for their response to the ambiguous stimulus. However, higher motor activity of the HFP line did not affect the results of the judgment bias test. Furthermore, there were no significant differences in plasma corticosterone levels between the lines, suggesting that differences in stress levels might not explain the results of the judgment bias test.