Questions tagged [gambit]

Questions about the Gambit-C implementation of the Scheme programming language.

Questions about the Gambit-C implementation of the Scheme programming language.

39 questions
0
votes
1 answer

Clear gsi command line Gambit

Anyone knows how to clear the command line in gsi Gambit of Scheme,like in the normal command line we use --> clear ,is there any command for that in gsi Gambit of Scheme? Is there any better IDE for Scheme? Thanks :)
lily niall
  • 39
  • 8
0
votes
1 answer

Removing Dominated Strategies in Strategic Game

The Problem I'm using Gambit's Python API to create a game tree. I have game tree with strategies and I want to reduce my tree by eliminating all strictly dominated strategies. 2 Reasons why I am not doing this in the Gambit UI is: sometimes my tree…
0
votes
1 answer

What is the difference between 'flonum?' and '##flonum?' in Gambit Scheme?

I see '##flonum?' in the source of the Calculator application in LambdaNative.
Vince Refiti
  • 483
  • 1
  • 5
  • 9
0
votes
1 answer

Writing a scheme function

How do I write a function that takes both a scoring function (which I've written already) and a list of pairs of strings as input (which I'm confused on how to write), and returns a modified list of pairs of strings, where the returned list should…
Definer
  • 1
  • 3
0
votes
1 answer

define-macro namespace in Gambit-C Scheme

Four modules: Defines library functions Defines library macros that use library functions Defines application functions that use library macros Loads the other three libfunc.scm: (define (my-func ls) ...) libmacro.scm: (define-macro (my-macro ls)…
Michael Fox
  • 3,632
  • 1
  • 17
  • 27
0
votes
1 answer

Can't get pointers to pointers working in Gambit-C scheme's FFI

I'm in the process of wrapping my graphics engine API with Gambit-C and have been successful so far with the FFI. Today I ran into a new problem that I can't easily get past. I have a structure like this in C: typedef struct render_list_rec { …
tbogdala
  • 98
  • 4
0
votes
1 answer

let definitions visible after error in gambit's gsi?

While experimenting with gambit's gsi (4.6.6), I ran into an odd situation when I typed in something invalid inside let. Doing it the normal way, everything is as expected. i andj are not visible. > (let ((i 4) (j 3)) (display (+ i j))…
BillRobertson42
  • 12,602
  • 4
  • 40
  • 57
-1
votes
1 answer

Chicken Scheme.- How to convert a complex number (for ex: (sqrt 2) ) to an integer? Regardless of rounding strategy

I am working on a C extension for Chicken Scheme and have everything in place but I am running into an issue with complex number types. My code can only handle integers and when any math is done that involves say a square root my extension may end…
-1
votes
1 answer

Generating all the possible values in a ndarray in numpy?

I am using gambit in python to simulate a world in a game theoretic manner. One construct of gambit is to save the "outcomes" for a set of decisions each player involved takes. This is of the form: game[d1,d2,d3,...,dn][n] = payoff where d1 is…
1 2
3