Hey there! Sign in to join this conversationNew here? Join for free
    Offline

    2
    ReputationRep:
    Swear like no one is doing Python this year lol
    Offline

    1
    ReputationRep:
    (Original post by crazyy)
    Do you guys think chapter 6 - System Life cycle will come up this year, I've never seen a question about it ever.
    There was only one question in 2011.
    Attached Images
  1. File Type: pdf AQA-COMP1-W-QP-Jun11 (2).pdf (222.0 KB, 77 views)
  2. File Type: pdf AQA-COMP1-W-MS-Jun11 (1).pdf (117.2 KB, 108 views)
    Offline

    10
    ReputationRep:
    (Original post by uGo1001)
    There was only one question in 2011.
    I was wondering, can you share me all your past papers you have before june 2013? I would really appreciate it
    Offline

    1
    ReputationRep:
    (Original post by crazyy)
    I was wondering, can you share me all your past papers you have before june 2013? I would really appreciate it
    Here is 09, 10 and 11. I don't have 12 and it's not on AQA's website either.,
    Attached Images
  3. File Type: pdf AQA-COMP1-W-MS-Jun09 version 1.1.pdf (486.5 KB, 129 views)
  4. File Type: pdf AQA-COMP1-W-QP-Jun09 (1).pdf (352.7 KB, 93 views)
  5. File Type: pdf AQA-COMP1-W-MS-Jun10.pdf (183.7 KB, 153 views)
  6. File Type: pdf AQA-COMP1-W-QP-Jun10 (1).pdf (187.2 KB, 139 views)
  7. File Type: pdf AQA-COMP1-W-MS-Jun11.pdf (117.2 KB, 72 views)
  8. File Type: pdf AQA-COMP1-W-QP-Jun11.pdf (222.0 KB, 126 views)
    Offline

    10
    ReputationRep:
    (Original post by uGo1001)
    Here is 09, 10 and 11. I don't have 12 and it's not on AQA's website either.,
    Thanks a bunch!!!
    Offline

    18
    ReputationRep:
    One thing I have found with placing the pieces in a place that can only take, the computer will often get stuck in an infinite loop looking for a place to put a piece. To combat this, I would recommend hard coding a maximum amount of tries a player can have and a way to skip a turn
    Offline

    1
    ReputationRep:
    (Original post by TomBoysie)
    I was wondering what this actually shows on the game display as when i have tried to implement this nothing happens, i must have made a mistake somewhere within my code. I will PM you it if you wouldnt mind helping me out please. Also "x += 1" what does that mean?
    yeah i don't mind if you PM for anymore queries, question or help
    P.S. x+=1 is x = x + 1
    Offline

    0
    ReputationRep:
    (Original post by uGo1001)
    Can you do this as pseudo code please?
    FOR( X = -1; WHILE X < 2; INCREMENT X)
    {
    FOR( Y = -1; WHILE Y < 2; INCREMENT Y)
    {
    FUNCTION(Board,BoardSize,Row, X, Y)
    }
    }
    // Two FOR statements work through the combination values of -1, 0 and 1
    Offline

    0
    ReputationRep:
    Has anybody figured out how to make the game skip a players turn if there are no possible flips?
    Offline

    1
    ReputationRep:
    (Original post by Hamij006)
    Has anybody figured out how to make the game skip a players turn if there are no possible flips?
    Check wikibooks
    Offline

    0
    ReputationRep:
    (Original post by uGo1001)
    Check wikibooks
    I have, and there are no solutions in any language on there.
    Offline

    0
    ReputationRep:
    Has anyone figured out how to make sure the computer only places pieces where a flip is possible?
    Offline

    2
    ReputationRep:
    (Original post by ThisGuyThough)
    fixed value: can't find one

    most wanted holder: Any variable that stores the user's input so "Coordinates" would be one

    gatherer: "Score"

    follower: can't find one

    and regarding the EAD. Question 3 (13) looks like an answer box for one of those "dry-run this dumb algorithm" type questions. I imagine one of those marks (in the box 14) is for correctly determining the purpose of the algorithm.
    BoardSize is kept as a global variable which is a fixed value, that gets altered internally by the player.
    The Score is a Stepper. It iterates through the board and stores the score of the player.
    There is no Most Wanted Holder. Coordinates are a temporary variable. They are held for a short time by the program.
    As to do with the follower, I agree, there is none.
    Offline

    1
    ReputationRep:
    Does anyone have the new spec EAD.
    • Thread Starter
    Offline

    2
    ReputationRep:
    (Original post by Filipo)
    BoardSize is kept as a global variable which is a fixed value, that gets altered internally by the player.
    The Score is a Stepper. It iterates through the board and stores the score of the player.
    There is no Most Wanted Holder. Coordinates are a temporary variable. They are held for a short time by the program.
    As to do with the follower, I agree, there is none.
    Just wanted to point out some corrections

    Score is a gatherer ( Gatherer tallies up a set of data)
    Row and column are steppers ( Are used to step through a array in function GetPlayerScore)

    The rest I agree with you

    here is my source and you guys can read up on the different variable roles that exist

    https://en.wikibooks.org/wiki/A-leve...e_of_Variables
    Offline

    2
    ReputationRep:
    Will we get any extra marks if we comment our code or are comments uneccessary for this exam?
    Offline

    0
    ReputationRep:
    (Original post by Filipo)
    BoardSize is kept as a global variable which is a fixed value, that gets altered internally by the player.
    The Score is a Stepper. It iterates through the board and stores the score of the player.
    There is no Most Wanted Holder. Coordinates are a temporary variable. They are held for a short time by the program.
    As to do with the follower, I agree, there is none.
    Oh sorry, I was thinking of a Most Recent Holder, Coordinates would be both a temporary and a Most Recent Holder.

    Score However I still think is a gatherer.

    I don't think BoardSize is a fixed value as it does change its value when the user decides to. Its actual value is changed outside of the main PlayGame routine and newly assigned by the routine "ChangeBoardSize" during the main menu while loop.
    Offline

    11
    ReputationRep:
    (Original post by uGo1001)
    Python code for only letting a player put a piece down if it takes an opponents piece:
    def CheckIfMoveIsValid(Board, Move, BoardSize, HumanPlayersTurn):
    Row = Move % 10
    Column = Move // 10
    MoveIsValid = False
    if Board[Row][Column] == " ":
    if HumanPlayersTurn == True:
    Board[Row][Column] = "H"
    else:
    Board[Row][Column] = "C"
    if ((CheckIfThereArePiecesToFlip(Bo ard, BoardSize, Row, Column, 1, 0) == True) or (CheckIfThereArePiecesToFlip(Boa rd, BoardSize, Row, Column, -1, 0) == True) or (CheckIfThereArePiecesToFlip(Boa rd, BoardSize, Row, Column, 0, 1) == True) or (CheckIfThereArePiecesToFlip(Boa rd, BoardSize, Row, Column, 0, -1) == True)):
    MoveIsValid = True
    else:
    MoveIsValid = False
    Board[Row][Column] = " "
    return MoveIsValid


    This will also work with diagonals if you add 4 more CheckIfThereArePiecesToFlip's.
    You'll also need to add BoardSize and HumanPlayersTurn when you in PlayGame when you call upon the function
    why are confusing this??

    if (Board[Row, Column] == ' ' && ( CheckIfThereArePiecesToFlip(Boar d, BoardSize, Row, Column, 1, 0) == true || CheckIfThereArePiecesToFlip(Boar d, BoardSize, Row, Column, 0, 1) == true || CheckIfThereArePiecesToFlip(Boar d, BoardSize, Row, Column, -1, 0) == true || CheckIfThereArePiecesToFlip(Boar d, BoardSize, Row, Column, 0, -1) == true))

    thats all u need
    Offline

    0
    ReputationRep:
    (Original post by TercioOfParma)
    One thing I have found with placing the pieces in a place that can only take, the computer will often get stuck in an infinite loop looking for a place to put a piece. To combat this, I would recommend hard coding a maximum amount of tries a player can have and a way to skip a turn
    I have a solution for this in python.

    I will write it in pseudocode:

    1) You will need a routine that creates a list of the possible moves that the computer/player can make. This routine assigns a value to an array called PossibleMoves. The routine is called just after DisplayGameBoard is called and before the second while loop in PlayGame is called.


    FUNCTION GetPossibleMoves(Board):
    __PossibleMoves <-- Array(Empty)
    ____For Row in Board:
    ______RowIndex <-- Board.index(Row)
    ______For Column in Row:
    ________ColumnIndex <-- Row.index(Column)
    ________IF Board[RowIndex][ColumnIndex] = " ":
    __________String(ColumnIndex)
    __________String(RowIndex)
    __________Coordinate <-- integer (ColumnIndex + RowIndex)
    __________PossibleMoves appends(Coordinate)

    Return PossibleMoves

    2) In the PlayGame Routine you need to check if all possible coordinates have been checked. Place the following just after the program obtains a random computer move but just before CheckMoveIsValid is run.

    IF Move in PossibleMoves:
    ___PossibleMoves.remove(Move)
    ___IF length of PossibleMoves = 0:
    _____Output a string Indicating to the user the computer could make no moves.
    Break Loop

    3) Change the conditions for the second while loop in PlayGame (the one that runs until MoveIsValid = True) to also include a check for the length of PossibleMoves being greater than 0
    Offline

    2
    ReputationRep:
    A very simple solution to only allowing a flip if it takes a piece is to let the move happen, and just delete the piece you placed if it didn't take another piece. You would need to impliment a max number of tries because the computer would infinite loop sometimes:
    Create a variable in PlayGame called "MadeAFlip" (Boolean = false)
    Whenever MakeMove is called, pass "MadeAFlip"
    In MakeMove, pass FlipOpponentPiecesInOneDirection "MadeAFlip" too.
    Then inside the existing "If FlipFound then..." loop in FlipOpponnentsPiecesInOneDirecti on, have the statement "MadeAFlip = True".
    Then in MakeMove put this if statement:

    If MadeAFlip = False Then
    Board(Row, Column) = ""
    End If

    Then loop until MadeAFlip = true in PlayGame.
 
 
 
Poll
Do you agree with the PM's proposal to cut tuition fees for some courses?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.