If you go to HMRC website to "Which costs qualify for R&D Relief?" you get directed to
To qualify as R&D, any activity must meet the definitions set out by the Department of Trade and Industry (DTI) - this organisation is now known as the Department for Business, Innovation and Skills. These guidelines state that the activity must contribute directly to seeking the advance in science or technology or must be a qualifying indirect activity.
if you follow the first link you find its complicated. Here are some quotes
To qualify as R&D, activities must fall to be accounted for as R&D under GAAP, and under whichever standard, as R&D (see BE Studios v Smith Williamson Ltd, HC04C0110).
Following the Guidelines, then, for there to be R&D, a company must be undertaking a project to seek an advance in science or technology through the resolution of scientific or technological uncertainties.
The advance being sought must constitute an advance in the overall knowledge or capability in a field of science or technology, not a company’s own state of knowledge or capability aloneAnd (my italics)
There may well be an important difference between a project for the development of a commercial product and an R&D project within the meaning of the legislation. A company with a project to produce a new product will often consider the whole project to be R&D. But this is not necessarily correct for the purposes of R&D tax relief. The activities that constitute R&D for tax purposes are those activities undertaken as part of the project which fall to be accounted for as R&D under generally accepted accounting practice and also fall within the special definitions set out in the BIS Guidelines (formerly DTI Guidelines) for activities to be treated as either ‘directly contributing’ to seeking the advance in science or technology, or as ‘qualifying indirect activity’.
Other aspects of the project will not be R&D for tax purposes, either because they are not seeking an advance in science or technology or because the activities fall outside the scope of R&D for tax purposes. For example, the BIS Guidelines (formerly DTI Guidelines) specifically exclude certain activities from the scope of R&D for tax purposes,
The fact that there is some advance in science or technology being sought within the project for the development of a new product does not make the whole of that project an R&D project for the purposes of the relief. So, for example, market research to identify the demand for the new product is not part of the R&D. A project for the development of a new product, that is not of itself R&D, may contain elements or sub- projects that can be R&D projects for the purposes of the relief. It is those elements or sub- projects undertaken with an aim to extend knowledge in a field of science or technology to which the relief applies. The sector in which activity is taking place does not change this
Finally we have a concrete example:
There is guidance on the meaning of R & D for tax purposes in BE Studios v Smith Williamson Ltd (the case number at the High Court is HC04C0110).
BE Studios had a project to produce new software. Mr. Justice Evans-Lombe accepted that it was not sufficient that the claimant’s products were innovative or cutting edge for them to be R&D within the meaning of the statute. The fundamental test was whether the software work sought to achieve a scientific and or technological advance, and formed the whole or part of a project to resolve scientific and or technological uncertainty on a systematic basis.
On the subject of computer games, he indicated that there were a number of stages in the production of a computer game. These involved conception or acquisition of the ideas for the game, planning, script-writing, drawing and designing backgrounds and characters, creating animated sequences and soundtrack and programming the result of these. He said ‘none of these activities without more necessarily involve qualifying R&D’.
He was presented with an extensive description of the company’s objectives in terms of new functionality and computer environments, but said that this nowhere described any new scientific or technological knowledge. The judge found that there was no evidence presented that supported the claim that R&D within the BIS Guidelines (formerly DTI Guidelines) had been carried out.